daily update on 20231113 by nitload youmu, upgrade gl loader complete
This commit is contained in:
@@ -52,9 +52,8 @@ namespace StgSharp.Graphics
|
||||
|
||||
~Form()
|
||||
{
|
||||
InternalIO.InternalUnloadGLcontext(glContext);
|
||||
GL.gl = default;
|
||||
Marshal.FreeHGlobal((IntPtr)glContext);
|
||||
Marshal.FreeHGlobal((IntPtr)contextID);
|
||||
}
|
||||
|
||||
public int Height
|
||||
@@ -108,13 +107,15 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
windowID = windowPtr;
|
||||
}
|
||||
|
||||
IntPtr ptr = Marshal.AllocHGlobal(sizeof(GLcontext));
|
||||
glContext = (GLcontext*)ptr;
|
||||
|
||||
glContext = new GLcontext();
|
||||
IntPtr ptr = Marshal.AllocHGlobal(sizeof(GLcontextIO));
|
||||
contextID = (GLcontextIO*)ptr;
|
||||
*contextID = new GLcontextIO();
|
||||
InternalIO.InternalWriteLog("Successfully create a context binded to current form. " +
|
||||
$"Its ID is {(ulong)ptr}", LogType.Info);
|
||||
}
|
||||
GL.gl = glContext;
|
||||
InternalIO.InternalSetCurrentGLContext(windowID, glContext);
|
||||
InternalIO.InternalSetCurrentGLContext(windowID, (IntPtr)contextID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user