daily update on 20230623 by nitload youmu, SSG lib rewrite
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user