daily update on 20240427 by nitload youmu
This commit is contained in:
@@ -56,16 +56,16 @@ namespace StgSharp.Graphics
|
||||
private static string glExtensionList;
|
||||
|
||||
/// <summary>
|
||||
/// Load all aupportable OpenGL APIs and bind them to given <see cref="Form"/> context.
|
||||
/// Load all supportted OpenGL APIs and bind them to given <see cref="Form"/> context.
|
||||
/// </summary>
|
||||
/// <param name="form">The <see cref="Form"/> used as current OpenGL context</param>
|
||||
/// <param name="loader">A delegate to get address of OprnGL api</param>
|
||||
public static unsafe void LoadGLapi(this Form form)
|
||||
/// <param name="stream">The <see cref="Form"/> used as current OpenGL context</param>
|
||||
/// <param name="loader">A delegate to get address of OpenGL api</param>
|
||||
public static unsafe void LoadGLapi(this glRenderStream stream)
|
||||
{
|
||||
GLcontext* context = (GLcontext*)form.graphicContextID;
|
||||
GLcontext* context = (GLcontext*)stream.ContextHandle;
|
||||
GLfuncLoader loader = InternalIO.glfwGetProcAddress;
|
||||
#pragma warning disable CS8909
|
||||
if (((GLcontext*)form.graphicContextID)->glGetString != (delegate*<uint, IntPtr>)IntPtr.Zero)
|
||||
if (((GLcontext*)stream.ContextHandle)->glGetString != (delegate*<uint, IntPtr>)IntPtr.Zero)
|
||||
#pragma warning restore CS8909
|
||||
{
|
||||
return;
|
||||
@@ -103,25 +103,25 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
#region load_core_gl
|
||||
|
||||
LoadGLcore10((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore11((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore12((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore13((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore14((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore15((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore20((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore21((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore30((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore31((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore32((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore33((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore40((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore41((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore42((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore43((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore44((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore45((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore46((GLcontext*)form.graphicContextID, loader);
|
||||
LoadGLcore10((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore11((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore12((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore13((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore14((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore15((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore20((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore21((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore30((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore31((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore32((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore33((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore40((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore41((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore42((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore43((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore44((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore45((GLcontext*)stream.ContextHandle, loader);
|
||||
LoadGLcore46((GLcontext*)stream.ContextHandle, loader);
|
||||
|
||||
#endregion load_core_gl
|
||||
}
|
||||
@@ -779,7 +779,7 @@ namespace StgSharp.Graphics
|
||||
/// Get the function pointer of given OpenGL api name
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the OpenGL api</param>
|
||||
/// <returns>The funtion pointer of the api in form of <see cref="IntPtr"/></returns>
|
||||
/// <returns>The funtion pointer of the api in stream of <see cref="IntPtr"/></returns>
|
||||
public static IntPtr LoadGLfunc(string name)
|
||||
{
|
||||
IntPtr ret = InternalIO.glfwGetProcAddress(name);
|
||||
|
||||
Reference in New Issue
Block a user