daily update on 20231113 by nitload youmu, upgrade gl loader complete

This commit is contained in:
Nitload
2023-11-14 02:51:12 +08:00
parent dac5f2455b
commit ae804553ce
84 changed files with 5492 additions and 98112 deletions
+8 -7
View File
@@ -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>