daily update on 20230623 by nitload youmu, SSG lib rewrite

This commit is contained in:
Nitload
2023-06-24 01:03:48 +08:00
parent ee8132c149
commit f99a0674b0
193 changed files with 16115 additions and 8972 deletions
+47 -3
View File
@@ -1,4 +1,5 @@
using System;
using StgSharp.Control;
using System;
using System.Collections.Generic;
using System.Text;
@@ -6,9 +7,52 @@ namespace StgSharp
{
public static unsafe partial class Graphic
{
public static void InitGL()
/// <summary>
/// Creates a window and its associated context.
/// </summary>
/// <param name="width">Required width</param>
/// <param name="height">Required width</param>
/// <param name="tittle">Tittle of the window </param>
/// <param name="monitor"></param>
/// <param name="share"></param>
/// <returns>The handle of created window</returns>
/// <exception cref="Exception"></exception>
public static unsafe IntPtr GLcreateWindow(int width, int height, char[] tittle, IntPtr monitor, IntPtr share)
{
InternalInitGL();
IntPtr windowPtr = glIO.InternalGLcreateWindow(width, height, tittle, monitor, share);
if ((int)windowPtr == -1 || (int)windowPtr == -2)
{
throw new Exception("Cannot create window instance!");
}
return windowPtr;
}
/// <summary>
/// Creates a window and its associated context.
/// </summary>
/// <param name="width">Required width</param>
/// <param name="height">Required width</param>
/// <param name="tittle">Tittle of the window </param>
/// <param name="monitor"></param>
/// <param name="share"></param>
/// <returns>The handle of created window</returns>
/// <exception cref="Exception"></exception>
public static unsafe IntPtr GLcreateWindow(int width, int height, string tittle, IntPtr monitor, IntPtr share)
{
IntPtr windowPtr = glIO.InternalGLcreateWindow(width, height, null, monitor, share);
if ((int)windowPtr == -1 || (int)windowPtr == -2)
{
throw new Exception("Cannot create window instance!");
}
return windowPtr;
}
}
}