diff --git a/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt b/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt index f74d8d73..995cbfa8 100644 --- a/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt +++ b/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt @@ -14,7 +14,10 @@ * copies or substantial portions of the Software. */ -/* note: adding a new extension +/* + * last updated on 2024/3/9 + * + * note: adding a new extension * you need to add the extension in glExtCaps::caps */ diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLAliasResolver.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLAliasResolver.java new file mode 100644 index 00000000..92375613 --- /dev/null +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLAliasResolver.java @@ -0,0 +1,919 @@ +/* + * MIT License + * + * Copyright (c) 2024 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.opengl; + +import overrun.marshal.Unmarshal; + +import java.lang.foreign.MemorySegment; + +/** + * The OpenGL function alias resolver + * + * @author squid233 + * @since 0.1.0 + */ +final class GLAliasResolver { + static MemorySegment resolve(GLLoadFunc load, String name) { + return switch (name) { + case "glActiveTexture" -> resolve(load, name, "glActiveTextureARB"); + case "glActiveTextureARB" -> resolve(load, name, "glActiveTexture"); + case "glArrayElement" -> resolve(load, name, "glArrayElementEXT"); + case "glArrayElementEXT" -> resolve(load, name, "glArrayElement"); + case "glAttachObjectARB" -> resolve(load, name, "glAttachShader"); + case "glAttachShader" -> resolve(load, name, "glAttachObjectARB"); + case "glBeginConditionalRender" -> resolve(load, name, "glBeginConditionalRenderNV"); + case "glBeginConditionalRenderNV" -> resolve(load, name, "glBeginConditionalRender"); + case "glBeginQuery" -> resolve(load, name, "glBeginQueryARB"); + case "glBeginQueryARB" -> resolve(load, name, "glBeginQuery"); + case "glBeginTransformFeedback" -> resolve(load, name, "glBeginTransformFeedbackEXT", "glBeginTransformFeedbackNV"); + case "glBeginTransformFeedbackEXT" -> resolve(load, name, "glBeginTransformFeedback", "glBeginTransformFeedbackNV"); + case "glBeginTransformFeedbackNV" -> resolve(load, name, "glBeginTransformFeedback", "glBeginTransformFeedbackEXT"); + case "glBindAttribLocation" -> resolve(load, name, "glBindAttribLocationARB"); + case "glBindAttribLocationARB" -> resolve(load, name, "glBindAttribLocation"); + case "glBindBuffer" -> resolve(load, name, "glBindBufferARB"); + case "glBindBufferARB" -> resolve(load, name, "glBindBuffer"); + case "glBindBufferBase" -> resolve(load, name, "glBindBufferBaseEXT", "glBindBufferBaseNV"); + case "glBindBufferBaseEXT" -> resolve(load, name, "glBindBufferBase", "glBindBufferBaseNV"); + case "glBindBufferBaseNV" -> resolve(load, name, "glBindBufferBase", "glBindBufferBaseEXT"); + case "glBindBufferOffsetEXT" -> resolve(load, name, "glBindBufferOffsetNV"); + case "glBindBufferOffsetNV" -> resolve(load, name, "glBindBufferOffsetEXT"); + case "glBindBufferRange" -> resolve(load, name, "glBindBufferRangeEXT", "glBindBufferRangeNV"); + case "glBindBufferRangeEXT" -> resolve(load, name, "glBindBufferRange", "glBindBufferRangeNV"); + case "glBindBufferRangeNV" -> resolve(load, name, "glBindBufferRange", "glBindBufferRangeEXT"); + case "glBindFragDataLocation" -> resolve(load, name, "glBindFragDataLocationEXT"); + case "glBindFragDataLocationEXT" -> resolve(load, name, "glBindFragDataLocation"); + case "glBindProgramARB" -> resolve(load, name, "glBindProgramNV"); + case "glBindProgramNV" -> resolve(load, name, "glBindProgramARB"); + case "glBindTexture" -> resolve(load, name, "glBindTextureEXT"); + case "glBindTextureEXT" -> resolve(load, name, "glBindTexture"); + case "glBlendColor" -> resolve(load, name, "glBlendColorEXT"); + case "glBlendColorEXT" -> resolve(load, name, "glBlendColor"); + case "glBlendEquation" -> resolve(load, name, "glBlendEquationEXT"); + case "glBlendEquationEXT" -> resolve(load, name, "glBlendEquation"); + case "glBlendEquationi" -> resolve(load, name, "glBlendEquationIndexedAMD", "glBlendEquationiARB"); + case "glBlendEquationiARB" -> resolve(load, name, "glBlendEquationIndexedAMD", "glBlendEquationi"); + case "glBlendEquationIndexedAMD" -> resolve(load, name, "glBlendEquationi", "glBlendEquationiARB"); + case "glBlendEquationSeparate" -> resolve(load, name, "glBlendEquationSeparateEXT"); + case "glBlendEquationSeparateEXT" -> resolve(load, name, "glBlendEquationSeparate"); + case "glBlendEquationSeparatei" -> resolve(load, name, "glBlendEquationSeparateIndexedAMD", "glBlendEquationSeparateiARB"); + case "glBlendEquationSeparateiARB" -> resolve(load, name, "glBlendEquationSeparateIndexedAMD", "glBlendEquationSeparatei"); + case "glBlendEquationSeparateIndexedAMD" -> resolve(load, name, "glBlendEquationSeparatei", "glBlendEquationSeparateiARB"); + case "glBlendFunci" -> resolve(load, name, "glBlendFuncIndexedAMD", "glBlendFunciARB"); + case "glBlendFunciARB" -> resolve(load, name, "glBlendFuncIndexedAMD", "glBlendFunci"); + case "glBlendFuncIndexedAMD" -> resolve(load, name, "glBlendFunci", "glBlendFunciARB"); + case "glBlendFuncSeparate" -> resolve(load, name, "glBlendFuncSeparateEXT", "glBlendFuncSeparateINGR"); + case "glBlendFuncSeparateEXT" -> resolve(load, name, "glBlendFuncSeparate", "glBlendFuncSeparateINGR"); + case "glBlendFuncSeparatei" -> resolve(load, name, "glBlendFuncSeparateIndexedAMD", "glBlendFuncSeparateiARB"); + case "glBlendFuncSeparateiARB" -> resolve(load, name, "glBlendFuncSeparateIndexedAMD", "glBlendFuncSeparatei"); + case "glBlendFuncSeparateIndexedAMD" -> resolve(load, name, "glBlendFuncSeparatei", "glBlendFuncSeparateiARB"); + case "glBlendFuncSeparateINGR" -> resolve(load, name, "glBlendFuncSeparate", "glBlendFuncSeparateEXT"); + case "glBlitFramebuffer" -> resolve(load, name, "glBlitFramebufferEXT"); + case "glBlitFramebufferEXT" -> resolve(load, name, "glBlitFramebuffer"); + case "glBufferData" -> resolve(load, name, "glBufferDataARB"); + case "glBufferDataARB" -> resolve(load, name, "glBufferData"); + case "glBufferSubData" -> resolve(load, name, "glBufferSubDataARB"); + case "glBufferSubDataARB" -> resolve(load, name, "glBufferSubData"); + case "glCheckFramebufferStatus" -> resolve(load, name, "glCheckFramebufferStatusEXT"); + case "glCheckFramebufferStatusEXT" -> resolve(load, name, "glCheckFramebufferStatus"); + case "glClampColor" -> resolve(load, name, "glClampColorARB"); + case "glClampColorARB" -> resolve(load, name, "glClampColor"); + case "glClearDepthf" -> resolve(load, name, "glClearDepthfOES"); + case "glClearDepthfOES" -> resolve(load, name, "glClearDepthf"); + case "glClientActiveTexture" -> resolve(load, name, "glClientActiveTextureARB"); + case "glClientActiveTextureARB" -> resolve(load, name, "glClientActiveTexture"); + case "glColorMaski" -> resolve(load, name, "glColorMaskIndexedEXT"); + case "glColorMaskIndexedEXT" -> resolve(load, name, "glColorMaski"); + case "glColorSubTable" -> resolve(load, name, "glColorSubTableEXT"); + case "glColorSubTableEXT" -> resolve(load, name, "glColorSubTable"); + case "glColorTable" -> resolve(load, name, "glColorTableEXT", "glColorTableSGI"); + case "glColorTableEXT" -> resolve(load, name, "glColorTable", "glColorTableSGI"); + case "glColorTableParameterfv" -> resolve(load, name, "glColorTableParameterfvSGI"); + case "glColorTableParameterfvSGI" -> resolve(load, name, "glColorTableParameterfv"); + case "glColorTableParameteriv" -> resolve(load, name, "glColorTableParameterivSGI"); + case "glColorTableParameterivSGI" -> resolve(load, name, "glColorTableParameteriv"); + case "glColorTableSGI" -> resolve(load, name, "glColorTable", "glColorTableEXT"); + case "glCompileShader" -> resolve(load, name, "glCompileShaderARB"); + case "glCompileShaderARB" -> resolve(load, name, "glCompileShader"); + case "glCompressedTexImage1D" -> resolve(load, name, "glCompressedTexImage1DARB"); + case "glCompressedTexImage1DARB" -> resolve(load, name, "glCompressedTexImage1D"); + case "glCompressedTexImage2D" -> resolve(load, name, "glCompressedTexImage2DARB"); + case "glCompressedTexImage2DARB" -> resolve(load, name, "glCompressedTexImage2D"); + case "glCompressedTexImage3D" -> resolve(load, name, "glCompressedTexImage3DARB"); + case "glCompressedTexImage3DARB" -> resolve(load, name, "glCompressedTexImage3D"); + case "glCompressedTexSubImage1D" -> resolve(load, name, "glCompressedTexSubImage1DARB"); + case "glCompressedTexSubImage1DARB" -> resolve(load, name, "glCompressedTexSubImage1D"); + case "glCompressedTexSubImage2D" -> resolve(load, name, "glCompressedTexSubImage2DARB"); + case "glCompressedTexSubImage2DARB" -> resolve(load, name, "glCompressedTexSubImage2D"); + case "glCompressedTexSubImage3D" -> resolve(load, name, "glCompressedTexSubImage3DARB"); + case "glCompressedTexSubImage3DARB" -> resolve(load, name, "glCompressedTexSubImage3D"); + case "glConvolutionFilter1D" -> resolve(load, name, "glConvolutionFilter1DEXT"); + case "glConvolutionFilter1DEXT" -> resolve(load, name, "glConvolutionFilter1D"); + case "glConvolutionFilter2D" -> resolve(load, name, "glConvolutionFilter2DEXT"); + case "glConvolutionFilter2DEXT" -> resolve(load, name, "glConvolutionFilter2D"); + case "glConvolutionParameterf" -> resolve(load, name, "glConvolutionParameterfEXT"); + case "glConvolutionParameterfEXT" -> resolve(load, name, "glConvolutionParameterf"); + case "glConvolutionParameterfv" -> resolve(load, name, "glConvolutionParameterfvEXT"); + case "glConvolutionParameterfvEXT" -> resolve(load, name, "glConvolutionParameterfv"); + case "glConvolutionParameteri" -> resolve(load, name, "glConvolutionParameteriEXT"); + case "glConvolutionParameteriEXT" -> resolve(load, name, "glConvolutionParameteri"); + case "glConvolutionParameteriv" -> resolve(load, name, "glConvolutionParameterivEXT"); + case "glConvolutionParameterivEXT" -> resolve(load, name, "glConvolutionParameteriv"); + case "glCopyColorSubTable" -> resolve(load, name, "glCopyColorSubTableEXT"); + case "glCopyColorSubTableEXT" -> resolve(load, name, "glCopyColorSubTable"); + case "glCopyColorTable" -> resolve(load, name, "glCopyColorTableSGI"); + case "glCopyColorTableSGI" -> resolve(load, name, "glCopyColorTable"); + case "glCopyConvolutionFilter1D" -> resolve(load, name, "glCopyConvolutionFilter1DEXT"); + case "glCopyConvolutionFilter1DEXT" -> resolve(load, name, "glCopyConvolutionFilter1D"); + case "glCopyConvolutionFilter2D" -> resolve(load, name, "glCopyConvolutionFilter2DEXT"); + case "glCopyConvolutionFilter2DEXT" -> resolve(load, name, "glCopyConvolutionFilter2D"); + case "glCopyTexImage1D" -> resolve(load, name, "glCopyTexImage1DEXT"); + case "glCopyTexImage1DEXT" -> resolve(load, name, "glCopyTexImage1D"); + case "glCopyTexImage2D" -> resolve(load, name, "glCopyTexImage2DEXT"); + case "glCopyTexImage2DEXT" -> resolve(load, name, "glCopyTexImage2D"); + case "glCopyTexSubImage1D" -> resolve(load, name, "glCopyTexSubImage1DEXT"); + case "glCopyTexSubImage1DEXT" -> resolve(load, name, "glCopyTexSubImage1D"); + case "glCopyTexSubImage2D" -> resolve(load, name, "glCopyTexSubImage2DEXT"); + case "glCopyTexSubImage2DEXT" -> resolve(load, name, "glCopyTexSubImage2D"); + case "glCopyTexSubImage3D" -> resolve(load, name, "glCopyTexSubImage3DEXT"); + case "glCopyTexSubImage3DEXT" -> resolve(load, name, "glCopyTexSubImage3D"); + case "glCreateProgram" -> resolve(load, name, "glCreateProgramObjectARB"); + case "glCreateProgramObjectARB" -> resolve(load, name, "glCreateProgram"); + case "glCreateShader" -> resolve(load, name, "glCreateShaderObjectARB"); + case "glCreateShaderObjectARB" -> resolve(load, name, "glCreateShader"); + case "glDebugMessageCallback" -> resolve(load, name, "glDebugMessageCallbackARB"); + case "glDebugMessageCallbackARB" -> resolve(load, name, "glDebugMessageCallback"); + case "glDebugMessageControl" -> resolve(load, name, "glDebugMessageControlARB"); + case "glDebugMessageControlARB" -> resolve(load, name, "glDebugMessageControl"); + case "glDebugMessageInsert" -> resolve(load, name, "glDebugMessageInsertARB"); + case "glDebugMessageInsertARB" -> resolve(load, name, "glDebugMessageInsert"); + case "glDeleteBuffers" -> resolve(load, name, "glDeleteBuffersARB"); + case "glDeleteBuffersARB" -> resolve(load, name, "glDeleteBuffers"); + case "glDeleteFramebuffers" -> resolve(load, name, "glDeleteFramebuffersEXT"); + case "glDeleteFramebuffersEXT" -> resolve(load, name, "glDeleteFramebuffers"); + case "glDeleteProgramsARB" -> resolve(load, name, "glDeleteProgramsNV"); + case "glDeleteProgramsNV" -> resolve(load, name, "glDeleteProgramsARB"); + case "glDeleteQueries" -> resolve(load, name, "glDeleteQueriesARB"); + case "glDeleteQueriesARB" -> resolve(load, name, "glDeleteQueries"); + case "glDeleteRenderbuffers" -> resolve(load, name, "glDeleteRenderbuffersEXT"); + case "glDeleteRenderbuffersEXT" -> resolve(load, name, "glDeleteRenderbuffers"); + case "glDeleteTransformFeedbacks" -> resolve(load, name, "glDeleteTransformFeedbacksNV"); + case "glDeleteTransformFeedbacksNV" -> resolve(load, name, "glDeleteTransformFeedbacks"); + case "glDeleteVertexArrays" -> resolve(load, name, "glDeleteVertexArraysAPPLE"); + case "glDeleteVertexArraysAPPLE" -> resolve(load, name, "glDeleteVertexArrays"); + case "glDepthRangef" -> resolve(load, name, "glDepthRangefOES"); + case "glDepthRangefOES" -> resolve(load, name, "glDepthRangef"); + case "glDetachObjectARB" -> resolve(load, name, "glDetachShader"); + case "glDetachShader" -> resolve(load, name, "glDetachObjectARB"); + case "glDisablei" -> resolve(load, name, "glDisableIndexedEXT"); + case "glDisableIndexedEXT" -> resolve(load, name, "glDisablei"); + case "glDisableVertexAttribArray" -> resolve(load, name, "glDisableVertexAttribArrayARB"); + case "glDisableVertexAttribArrayARB" -> resolve(load, name, "glDisableVertexAttribArray"); + case "glDrawArrays" -> resolve(load, name, "glDrawArraysEXT"); + case "glDrawArraysEXT" -> resolve(load, name, "glDrawArrays"); + case "glDrawArraysInstanced" -> resolve(load, name, "glDrawArraysInstancedARB", "glDrawArraysInstancedEXT"); + case "glDrawArraysInstancedARB" -> resolve(load, name, "glDrawArraysInstanced", "glDrawArraysInstancedEXT"); + case "glDrawArraysInstancedEXT" -> resolve(load, name, "glDrawArraysInstanced", "glDrawArraysInstancedARB"); + case "glDrawBuffers" -> resolve(load, name, "glDrawBuffersARB", "glDrawBuffersATI"); + case "glDrawBuffersARB" -> resolve(load, name, "glDrawBuffers", "glDrawBuffersATI"); + case "glDrawBuffersATI" -> resolve(load, name, "glDrawBuffers", "glDrawBuffersARB"); + case "glDrawElementsInstanced" -> resolve(load, name, "glDrawElementsInstancedARB", "glDrawElementsInstancedEXT"); + case "glDrawElementsInstancedARB" -> resolve(load, name, "glDrawElementsInstanced", "glDrawElementsInstancedEXT"); + case "glDrawElementsInstancedEXT" -> resolve(load, name, "glDrawElementsInstanced", "glDrawElementsInstancedARB"); + case "glDrawRangeElements" -> resolve(load, name, "glDrawRangeElementsEXT"); + case "glDrawRangeElementsEXT" -> resolve(load, name, "glDrawRangeElements"); + case "glDrawTransformFeedback" -> resolve(load, name, "glDrawTransformFeedbackNV"); + case "glDrawTransformFeedbackNV" -> resolve(load, name, "glDrawTransformFeedback"); + case "glEnablei" -> resolve(load, name, "glEnableIndexedEXT"); + case "glEnableIndexedEXT" -> resolve(load, name, "glEnablei"); + case "glEnableVertexAttribArray" -> resolve(load, name, "glEnableVertexAttribArrayARB"); + case "glEnableVertexAttribArrayARB" -> resolve(load, name, "glEnableVertexAttribArray"); + case "glEndConditionalRender" -> resolve(load, name, "glEndConditionalRenderNV", "glEndConditionalRenderNVX"); + case "glEndConditionalRenderNV" -> resolve(load, name, "glEndConditionalRender", "glEndConditionalRenderNVX"); + case "glEndConditionalRenderNVX" -> resolve(load, name, "glEndConditionalRender", "glEndConditionalRenderNV"); + case "glEndQuery" -> resolve(load, name, "glEndQueryARB"); + case "glEndQueryARB" -> resolve(load, name, "glEndQuery"); + case "glEndTransformFeedback" -> resolve(load, name, "glEndTransformFeedbackEXT", "glEndTransformFeedbackNV"); + case "glEndTransformFeedbackEXT" -> resolve(load, name, "glEndTransformFeedback", "glEndTransformFeedbackNV"); + case "glEndTransformFeedbackNV" -> resolve(load, name, "glEndTransformFeedback", "glEndTransformFeedbackEXT"); + case "glFlushMappedBufferRange" -> resolve(load, name, "glFlushMappedBufferRangeAPPLE"); + case "glFlushMappedBufferRangeAPPLE" -> resolve(load, name, "glFlushMappedBufferRange"); + case "glFogCoordd" -> resolve(load, name, "glFogCoorddEXT"); + case "glFogCoorddEXT" -> resolve(load, name, "glFogCoordd"); + case "glFogCoorddv" -> resolve(load, name, "glFogCoorddvEXT"); + case "glFogCoorddvEXT" -> resolve(load, name, "glFogCoorddv"); + case "glFogCoordf" -> resolve(load, name, "glFogCoordfEXT"); + case "glFogCoordfEXT" -> resolve(load, name, "glFogCoordf"); + case "glFogCoordfv" -> resolve(load, name, "glFogCoordfvEXT"); + case "glFogCoordfvEXT" -> resolve(load, name, "glFogCoordfv"); + case "glFogCoordPointer" -> resolve(load, name, "glFogCoordPointerEXT"); + case "glFogCoordPointerEXT" -> resolve(load, name, "glFogCoordPointer"); + case "glFramebufferRenderbuffer" -> resolve(load, name, "glFramebufferRenderbufferEXT"); + case "glFramebufferRenderbufferEXT" -> resolve(load, name, "glFramebufferRenderbuffer"); + case "glFramebufferTexture" -> resolve(load, name, "glFramebufferTextureARB", "glFramebufferTextureEXT"); + case "glFramebufferTexture1D" -> resolve(load, name, "glFramebufferTexture1DEXT"); + case "glFramebufferTexture1DEXT" -> resolve(load, name, "glFramebufferTexture1D"); + case "glFramebufferTexture2D" -> resolve(load, name, "glFramebufferTexture2DEXT"); + case "glFramebufferTexture2DEXT" -> resolve(load, name, "glFramebufferTexture2D"); + case "glFramebufferTexture3D" -> resolve(load, name, "glFramebufferTexture3DEXT"); + case "glFramebufferTexture3DEXT" -> resolve(load, name, "glFramebufferTexture3D"); + case "glFramebufferTextureARB" -> resolve(load, name, "glFramebufferTexture", "glFramebufferTextureEXT"); + case "glFramebufferTextureEXT" -> resolve(load, name, "glFramebufferTexture", "glFramebufferTextureARB"); + case "glFramebufferTextureFaceARB" -> resolve(load, name, "glFramebufferTextureFaceEXT"); + case "glFramebufferTextureFaceEXT" -> resolve(load, name, "glFramebufferTextureFaceARB"); + case "glFramebufferTextureLayer" -> resolve(load, name, "glFramebufferTextureLayerARB", "glFramebufferTextureLayerEXT"); + case "glFramebufferTextureLayerARB" -> resolve(load, name, "glFramebufferTextureLayer", "glFramebufferTextureLayerEXT"); + case "glFramebufferTextureLayerEXT" -> resolve(load, name, "glFramebufferTextureLayer", "glFramebufferTextureLayerARB"); + case "glGenBuffers" -> resolve(load, name, "glGenBuffersARB"); + case "glGenBuffersARB" -> resolve(load, name, "glGenBuffers"); + case "glGenerateMipmap" -> resolve(load, name, "glGenerateMipmapEXT"); + case "glGenerateMipmapEXT" -> resolve(load, name, "glGenerateMipmap"); + case "glGenFramebuffers" -> resolve(load, name, "glGenFramebuffersEXT"); + case "glGenFramebuffersEXT" -> resolve(load, name, "glGenFramebuffers"); + case "glGenProgramsARB" -> resolve(load, name, "glGenProgramsNV"); + case "glGenProgramsNV" -> resolve(load, name, "glGenProgramsARB"); + case "glGenQueries" -> resolve(load, name, "glGenQueriesARB"); + case "glGenQueriesARB" -> resolve(load, name, "glGenQueries"); + case "glGenRenderbuffers" -> resolve(load, name, "glGenRenderbuffersEXT"); + case "glGenRenderbuffersEXT" -> resolve(load, name, "glGenRenderbuffers"); + case "glGenTransformFeedbacks" -> resolve(load, name, "glGenTransformFeedbacksNV"); + case "glGenTransformFeedbacksNV" -> resolve(load, name, "glGenTransformFeedbacks"); + case "glGenVertexArrays" -> resolve(load, name, "glGenVertexArraysAPPLE"); + case "glGenVertexArraysAPPLE" -> resolve(load, name, "glGenVertexArrays"); + case "glGetActiveAttrib" -> resolve(load, name, "glGetActiveAttribARB"); + case "glGetActiveAttribARB" -> resolve(load, name, "glGetActiveAttrib"); + case "glGetActiveUniform" -> resolve(load, name, "glGetActiveUniformARB"); + case "glGetActiveUniformARB" -> resolve(load, name, "glGetActiveUniform"); + case "glGetAttribLocation" -> resolve(load, name, "glGetAttribLocationARB"); + case "glGetAttribLocationARB" -> resolve(load, name, "glGetAttribLocation"); + case "glGetBooleani_v" -> resolve(load, name, "glGetBooleanIndexedvEXT"); + case "glGetBooleanIndexedvEXT" -> resolve(load, name, "glGetBooleani_v"); + case "glGetBufferParameteriv" -> resolve(load, name, "glGetBufferParameterivARB"); + case "glGetBufferParameterivARB" -> resolve(load, name, "glGetBufferParameteriv"); + case "glGetBufferPointerv" -> resolve(load, name, "glGetBufferPointervARB"); + case "glGetBufferPointervARB" -> resolve(load, name, "glGetBufferPointerv"); + case "glGetBufferSubData" -> resolve(load, name, "glGetBufferSubDataARB"); + case "glGetBufferSubDataARB" -> resolve(load, name, "glGetBufferSubData"); + case "glGetColorTable" -> resolve(load, name, "glGetColorTableEXT"); + case "glGetColorTableEXT" -> resolve(load, name, "glGetColorTable"); + case "glGetColorTableParameterfv" -> resolve(load, name, "glGetColorTableParameterfvEXT"); + case "glGetColorTableParameterfvEXT" -> resolve(load, name, "glGetColorTableParameterfv"); + case "glGetColorTableParameteriv" -> resolve(load, name, "glGetColorTableParameterivEXT"); + case "glGetColorTableParameterivEXT" -> resolve(load, name, "glGetColorTableParameteriv"); + case "glGetCompressedTexImage" -> resolve(load, name, "glGetCompressedTexImageARB"); + case "glGetCompressedTexImageARB" -> resolve(load, name, "glGetCompressedTexImage"); + case "glGetDebugMessageLog" -> resolve(load, name, "glGetDebugMessageLogARB"); + case "glGetDebugMessageLogARB" -> resolve(load, name, "glGetDebugMessageLog"); + case "glGetDoublei_v" -> resolve(load, name, "glGetDoubleIndexedvEXT", "glGetDoublei_vEXT"); + case "glGetDoublei_vEXT" -> resolve(load, name, "glGetDoubleIndexedvEXT", "glGetDoublei_v"); + case "glGetDoubleIndexedvEXT" -> resolve(load, name, "glGetDoublei_v", "glGetDoublei_vEXT"); + case "glGetFloati_v" -> resolve(load, name, "glGetFloatIndexedvEXT", "glGetFloati_vEXT"); + case "glGetFloati_vEXT" -> resolve(load, name, "glGetFloatIndexedvEXT", "glGetFloati_v"); + case "glGetFloatIndexedvEXT" -> resolve(load, name, "glGetFloati_v", "glGetFloati_vEXT"); + case "glGetFragDataLocation" -> resolve(load, name, "glGetFragDataLocationEXT"); + case "glGetFragDataLocationEXT" -> resolve(load, name, "glGetFragDataLocation"); + case "glGetFramebufferAttachmentParameteriv" -> resolve(load, name, "glGetFramebufferAttachmentParameterivEXT"); + case "glGetFramebufferAttachmentParameterivEXT" -> resolve(load, name, "glGetFramebufferAttachmentParameteriv"); + case "glGetIntegeri_v" -> resolve(load, name, "glGetIntegerIndexedvEXT"); + case "glGetIntegerIndexedvEXT" -> resolve(load, name, "glGetIntegeri_v"); + case "glGetMultisamplefv" -> resolve(load, name, "glGetMultisamplefvNV"); + case "glGetMultisamplefvNV" -> resolve(load, name, "glGetMultisamplefv"); + case "glGetPointerv" -> resolve(load, name, "glGetPointervEXT"); + case "glGetPointervEXT" -> resolve(load, name, "glGetPointerv"); + case "glGetQueryiv" -> resolve(load, name, "glGetQueryivARB"); + case "glGetQueryivARB" -> resolve(load, name, "glGetQueryiv"); + case "glGetQueryObjecti64v" -> resolve(load, name, "glGetQueryObjecti64vEXT"); + case "glGetQueryObjecti64vEXT" -> resolve(load, name, "glGetQueryObjecti64v"); + case "glGetQueryObjectiv" -> resolve(load, name, "glGetQueryObjectivARB"); + case "glGetQueryObjectivARB" -> resolve(load, name, "glGetQueryObjectiv"); + case "glGetQueryObjectui64v" -> resolve(load, name, "glGetQueryObjectui64vEXT"); + case "glGetQueryObjectui64vEXT" -> resolve(load, name, "glGetQueryObjectui64v"); + case "glGetQueryObjectuiv" -> resolve(load, name, "glGetQueryObjectuivARB"); + case "glGetQueryObjectuivARB" -> resolve(load, name, "glGetQueryObjectuiv"); + case "glGetRenderbufferParameteriv" -> resolve(load, name, "glGetRenderbufferParameterivEXT"); + case "glGetRenderbufferParameterivEXT" -> resolve(load, name, "glGetRenderbufferParameteriv"); + case "glGetShaderSource" -> resolve(load, name, "glGetShaderSourceARB"); + case "glGetShaderSourceARB" -> resolve(load, name, "glGetShaderSource"); + case "glGetTexParameterIiv" -> resolve(load, name, "glGetTexParameterIivEXT"); + case "glGetTexParameterIivEXT" -> resolve(load, name, "glGetTexParameterIiv"); + case "glGetTexParameterIuiv" -> resolve(load, name, "glGetTexParameterIuivEXT"); + case "glGetTexParameterIuivEXT" -> resolve(load, name, "glGetTexParameterIuiv"); + case "glGetTransformFeedbackVarying" -> resolve(load, name, "glGetTransformFeedbackVaryingEXT"); + case "glGetTransformFeedbackVaryingEXT" -> resolve(load, name, "glGetTransformFeedbackVarying"); + case "glGetUniformfv" -> resolve(load, name, "glGetUniformfvARB"); + case "glGetUniformfvARB" -> resolve(load, name, "glGetUniformfv"); + case "glGetUniformiv" -> resolve(load, name, "glGetUniformivARB"); + case "glGetUniformivARB" -> resolve(load, name, "glGetUniformiv"); + case "glGetUniformLocation" -> resolve(load, name, "glGetUniformLocationARB"); + case "glGetUniformLocationARB" -> resolve(load, name, "glGetUniformLocation"); + case "glGetUniformuiv" -> resolve(load, name, "glGetUniformuivEXT"); + case "glGetUniformuivEXT" -> resolve(load, name, "glGetUniformuiv"); + case "glGetVertexAttribdv" -> resolve(load, name, "glGetVertexAttribdvARB", "glGetVertexAttribdvNV"); + case "glGetVertexAttribdvARB" -> resolve(load, name, "glGetVertexAttribdv", "glGetVertexAttribdvNV"); + case "glGetVertexAttribdvNV" -> resolve(load, name, "glGetVertexAttribdv", "glGetVertexAttribdvARB"); + case "glGetVertexAttribfv" -> resolve(load, name, "glGetVertexAttribfvARB", "glGetVertexAttribfvNV"); + case "glGetVertexAttribfvARB" -> resolve(load, name, "glGetVertexAttribfv", "glGetVertexAttribfvNV"); + case "glGetVertexAttribfvNV" -> resolve(load, name, "glGetVertexAttribfv", "glGetVertexAttribfvARB"); + case "glGetVertexAttribIiv" -> resolve(load, name, "glGetVertexAttribIivEXT"); + case "glGetVertexAttribIivEXT" -> resolve(load, name, "glGetVertexAttribIiv"); + case "glGetVertexAttribIuiv" -> resolve(load, name, "glGetVertexAttribIuivEXT"); + case "glGetVertexAttribIuivEXT" -> resolve(load, name, "glGetVertexAttribIuiv"); + case "glGetVertexAttribiv" -> resolve(load, name, "glGetVertexAttribivARB", "glGetVertexAttribivNV"); + case "glGetVertexAttribivARB" -> resolve(load, name, "glGetVertexAttribiv", "glGetVertexAttribivNV"); + case "glGetVertexAttribivNV" -> resolve(load, name, "glGetVertexAttribiv", "glGetVertexAttribivARB"); + case "glGetVertexAttribLdv" -> resolve(load, name, "glGetVertexAttribLdvEXT"); + case "glGetVertexAttribLdvEXT" -> resolve(load, name, "glGetVertexAttribLdv"); + case "glGetVertexAttribPointerv" -> resolve(load, name, "glGetVertexAttribPointervARB", "glGetVertexAttribPointervNV"); + case "glGetVertexAttribPointervARB" -> resolve(load, name, "glGetVertexAttribPointerv", "glGetVertexAttribPointervNV"); + case "glGetVertexAttribPointervNV" -> resolve(load, name, "glGetVertexAttribPointerv", "glGetVertexAttribPointervARB"); + case "glHistogram" -> resolve(load, name, "glHistogramEXT"); + case "glHistogramEXT" -> resolve(load, name, "glHistogram"); + case "glIsBuffer" -> resolve(load, name, "glIsBufferARB"); + case "glIsBufferARB" -> resolve(load, name, "glIsBuffer"); + case "glIsEnabledi" -> resolve(load, name, "glIsEnabledIndexedEXT"); + case "glIsEnabledIndexedEXT" -> resolve(load, name, "glIsEnabledi"); + case "glIsFramebuffer" -> resolve(load, name, "glIsFramebufferEXT"); + case "glIsFramebufferEXT" -> resolve(load, name, "glIsFramebuffer"); + case "glIsProgramARB" -> resolve(load, name, "glIsProgramNV"); + case "glIsProgramNV" -> resolve(load, name, "glIsProgramARB"); + case "glIsQuery" -> resolve(load, name, "glIsQueryARB"); + case "glIsQueryARB" -> resolve(load, name, "glIsQuery"); + case "glIsRenderbuffer" -> resolve(load, name, "glIsRenderbufferEXT"); + case "glIsRenderbufferEXT" -> resolve(load, name, "glIsRenderbuffer"); + case "glIsTransformFeedback" -> resolve(load, name, "glIsTransformFeedbackNV"); + case "glIsTransformFeedbackNV" -> resolve(load, name, "glIsTransformFeedback"); + case "glIsVertexArray" -> resolve(load, name, "glIsVertexArrayAPPLE"); + case "glIsVertexArrayAPPLE" -> resolve(load, name, "glIsVertexArray"); + case "glLinkProgram" -> resolve(load, name, "glLinkProgramARB"); + case "glLinkProgramARB" -> resolve(load, name, "glLinkProgram"); + case "glLoadTransposeMatrixd" -> resolve(load, name, "glLoadTransposeMatrixdARB"); + case "glLoadTransposeMatrixdARB" -> resolve(load, name, "glLoadTransposeMatrixd"); + case "glLoadTransposeMatrixf" -> resolve(load, name, "glLoadTransposeMatrixfARB"); + case "glLoadTransposeMatrixfARB" -> resolve(load, name, "glLoadTransposeMatrixf"); + case "glMapBuffer" -> resolve(load, name, "glMapBufferARB"); + case "glMapBufferARB" -> resolve(load, name, "glMapBuffer"); + case "glMaxShaderCompilerThreadsARB" -> resolve(load, name, "glMaxShaderCompilerThreadsKHR"); + case "glMaxShaderCompilerThreadsKHR" -> resolve(load, name, "glMaxShaderCompilerThreadsARB"); + case "glMemoryBarrier" -> resolve(load, name, "glMemoryBarrierEXT"); + case "glMemoryBarrierEXT" -> resolve(load, name, "glMemoryBarrier"); + case "glMinmax" -> resolve(load, name, "glMinmaxEXT"); + case "glMinmaxEXT" -> resolve(load, name, "glMinmax"); + case "glMinSampleShading" -> resolve(load, name, "glMinSampleShadingARB"); + case "glMinSampleShadingARB" -> resolve(load, name, "glMinSampleShading"); + case "glMultiDrawArrays" -> resolve(load, name, "glMultiDrawArraysEXT"); + case "glMultiDrawArraysEXT" -> resolve(load, name, "glMultiDrawArrays"); + case "glMultiDrawArraysIndirect" -> resolve(load, name, "glMultiDrawArraysIndirectAMD"); + case "glMultiDrawArraysIndirectAMD" -> resolve(load, name, "glMultiDrawArraysIndirect"); + case "glMultiDrawArraysIndirectCount" -> resolve(load, name, "glMultiDrawArraysIndirectCountARB"); + case "glMultiDrawArraysIndirectCountARB" -> resolve(load, name, "glMultiDrawArraysIndirectCount"); + case "glMultiDrawElements" -> resolve(load, name, "glMultiDrawElementsEXT"); + case "glMultiDrawElementsEXT" -> resolve(load, name, "glMultiDrawElements"); + case "glMultiDrawElementsIndirect" -> resolve(load, name, "glMultiDrawElementsIndirectAMD"); + case "glMultiDrawElementsIndirectAMD" -> resolve(load, name, "glMultiDrawElementsIndirect"); + case "glMultiDrawElementsIndirectCount" -> resolve(load, name, "glMultiDrawElementsIndirectCountARB"); + case "glMultiDrawElementsIndirectCountARB" -> resolve(load, name, "glMultiDrawElementsIndirectCount"); + case "glMultiTexCoord1d" -> resolve(load, name, "glMultiTexCoord1dARB"); + case "glMultiTexCoord1dARB" -> resolve(load, name, "glMultiTexCoord1d"); + case "glMultiTexCoord1dv" -> resolve(load, name, "glMultiTexCoord1dvARB"); + case "glMultiTexCoord1dvARB" -> resolve(load, name, "glMultiTexCoord1dv"); + case "glMultiTexCoord1f" -> resolve(load, name, "glMultiTexCoord1fARB"); + case "glMultiTexCoord1fARB" -> resolve(load, name, "glMultiTexCoord1f"); + case "glMultiTexCoord1fv" -> resolve(load, name, "glMultiTexCoord1fvARB"); + case "glMultiTexCoord1fvARB" -> resolve(load, name, "glMultiTexCoord1fv"); + case "glMultiTexCoord1i" -> resolve(load, name, "glMultiTexCoord1iARB"); + case "glMultiTexCoord1iARB" -> resolve(load, name, "glMultiTexCoord1i"); + case "glMultiTexCoord1iv" -> resolve(load, name, "glMultiTexCoord1ivARB"); + case "glMultiTexCoord1ivARB" -> resolve(load, name, "glMultiTexCoord1iv"); + case "glMultiTexCoord1s" -> resolve(load, name, "glMultiTexCoord1sARB"); + case "glMultiTexCoord1sARB" -> resolve(load, name, "glMultiTexCoord1s"); + case "glMultiTexCoord1sv" -> resolve(load, name, "glMultiTexCoord1svARB"); + case "glMultiTexCoord1svARB" -> resolve(load, name, "glMultiTexCoord1sv"); + case "glMultiTexCoord2d" -> resolve(load, name, "glMultiTexCoord2dARB"); + case "glMultiTexCoord2dARB" -> resolve(load, name, "glMultiTexCoord2d"); + case "glMultiTexCoord2dv" -> resolve(load, name, "glMultiTexCoord2dvARB"); + case "glMultiTexCoord2dvARB" -> resolve(load, name, "glMultiTexCoord2dv"); + case "glMultiTexCoord2f" -> resolve(load, name, "glMultiTexCoord2fARB"); + case "glMultiTexCoord2fARB" -> resolve(load, name, "glMultiTexCoord2f"); + case "glMultiTexCoord2fv" -> resolve(load, name, "glMultiTexCoord2fvARB"); + case "glMultiTexCoord2fvARB" -> resolve(load, name, "glMultiTexCoord2fv"); + case "glMultiTexCoord2i" -> resolve(load, name, "glMultiTexCoord2iARB"); + case "glMultiTexCoord2iARB" -> resolve(load, name, "glMultiTexCoord2i"); + case "glMultiTexCoord2iv" -> resolve(load, name, "glMultiTexCoord2ivARB"); + case "glMultiTexCoord2ivARB" -> resolve(load, name, "glMultiTexCoord2iv"); + case "glMultiTexCoord2s" -> resolve(load, name, "glMultiTexCoord2sARB"); + case "glMultiTexCoord2sARB" -> resolve(load, name, "glMultiTexCoord2s"); + case "glMultiTexCoord2sv" -> resolve(load, name, "glMultiTexCoord2svARB"); + case "glMultiTexCoord2svARB" -> resolve(load, name, "glMultiTexCoord2sv"); + case "glMultiTexCoord3d" -> resolve(load, name, "glMultiTexCoord3dARB"); + case "glMultiTexCoord3dARB" -> resolve(load, name, "glMultiTexCoord3d"); + case "glMultiTexCoord3dv" -> resolve(load, name, "glMultiTexCoord3dvARB"); + case "glMultiTexCoord3dvARB" -> resolve(load, name, "glMultiTexCoord3dv"); + case "glMultiTexCoord3f" -> resolve(load, name, "glMultiTexCoord3fARB"); + case "glMultiTexCoord3fARB" -> resolve(load, name, "glMultiTexCoord3f"); + case "glMultiTexCoord3fv" -> resolve(load, name, "glMultiTexCoord3fvARB"); + case "glMultiTexCoord3fvARB" -> resolve(load, name, "glMultiTexCoord3fv"); + case "glMultiTexCoord3i" -> resolve(load, name, "glMultiTexCoord3iARB"); + case "glMultiTexCoord3iARB" -> resolve(load, name, "glMultiTexCoord3i"); + case "glMultiTexCoord3iv" -> resolve(load, name, "glMultiTexCoord3ivARB"); + case "glMultiTexCoord3ivARB" -> resolve(load, name, "glMultiTexCoord3iv"); + case "glMultiTexCoord3s" -> resolve(load, name, "glMultiTexCoord3sARB"); + case "glMultiTexCoord3sARB" -> resolve(load, name, "glMultiTexCoord3s"); + case "glMultiTexCoord3sv" -> resolve(load, name, "glMultiTexCoord3svARB"); + case "glMultiTexCoord3svARB" -> resolve(load, name, "glMultiTexCoord3sv"); + case "glMultiTexCoord4d" -> resolve(load, name, "glMultiTexCoord4dARB"); + case "glMultiTexCoord4dARB" -> resolve(load, name, "glMultiTexCoord4d"); + case "glMultiTexCoord4dv" -> resolve(load, name, "glMultiTexCoord4dvARB"); + case "glMultiTexCoord4dvARB" -> resolve(load, name, "glMultiTexCoord4dv"); + case "glMultiTexCoord4f" -> resolve(load, name, "glMultiTexCoord4fARB"); + case "glMultiTexCoord4fARB" -> resolve(load, name, "glMultiTexCoord4f"); + case "glMultiTexCoord4fv" -> resolve(load, name, "glMultiTexCoord4fvARB"); + case "glMultiTexCoord4fvARB" -> resolve(load, name, "glMultiTexCoord4fv"); + case "glMultiTexCoord4i" -> resolve(load, name, "glMultiTexCoord4iARB"); + case "glMultiTexCoord4iARB" -> resolve(load, name, "glMultiTexCoord4i"); + case "glMultiTexCoord4iv" -> resolve(load, name, "glMultiTexCoord4ivARB"); + case "glMultiTexCoord4ivARB" -> resolve(load, name, "glMultiTexCoord4iv"); + case "glMultiTexCoord4s" -> resolve(load, name, "glMultiTexCoord4sARB"); + case "glMultiTexCoord4sARB" -> resolve(load, name, "glMultiTexCoord4s"); + case "glMultiTexCoord4sv" -> resolve(load, name, "glMultiTexCoord4svARB"); + case "glMultiTexCoord4svARB" -> resolve(load, name, "glMultiTexCoord4sv"); + case "glMultTransposeMatrixd" -> resolve(load, name, "glMultTransposeMatrixdARB"); + case "glMultTransposeMatrixdARB" -> resolve(load, name, "glMultTransposeMatrixd"); + case "glMultTransposeMatrixf" -> resolve(load, name, "glMultTransposeMatrixfARB"); + case "glMultTransposeMatrixfARB" -> resolve(load, name, "glMultTransposeMatrixf"); + case "glNamedBufferStorage" -> resolve(load, name, "glNamedBufferStorageEXT"); + case "glNamedBufferStorageEXT" -> resolve(load, name, "glNamedBufferStorage"); + case "glNamedBufferSubData" -> resolve(load, name, "glNamedBufferSubDataEXT"); + case "glNamedBufferSubDataEXT" -> resolve(load, name, "glNamedBufferSubData"); + case "glPauseTransformFeedback" -> resolve(load, name, "glPauseTransformFeedbackNV"); + case "glPauseTransformFeedbackNV" -> resolve(load, name, "glPauseTransformFeedback"); + case "glPointParameterf" -> resolve(load, name, "glPointParameterfARB", "glPointParameterfEXT", "glPointParameterfSGIS"); + case "glPointParameterfARB" -> resolve(load, name, "glPointParameterf", "glPointParameterfEXT", "glPointParameterfSGIS"); + case "glPointParameterfEXT" -> resolve(load, name, "glPointParameterf", "glPointParameterfARB", "glPointParameterfSGIS"); + case "glPointParameterfSGIS" -> resolve(load, name, "glPointParameterf", "glPointParameterfARB", "glPointParameterfEXT"); + case "glPointParameterfv" -> resolve(load, name, "glPointParameterfvARB", "glPointParameterfvEXT", "glPointParameterfvSGIS"); + case "glPointParameterfvARB" -> resolve(load, name, "glPointParameterfv", "glPointParameterfvEXT", "glPointParameterfvSGIS"); + case "glPointParameterfvEXT" -> resolve(load, name, "glPointParameterfv", "glPointParameterfvARB", "glPointParameterfvSGIS"); + case "glPointParameterfvSGIS" -> resolve(load, name, "glPointParameterfv", "glPointParameterfvARB", "glPointParameterfvEXT"); + case "glPointParameteri" -> resolve(load, name, "glPointParameteriNV"); + case "glPointParameteriNV" -> resolve(load, name, "glPointParameteri"); + case "glPointParameteriv" -> resolve(load, name, "glPointParameterivNV"); + case "glPointParameterivNV" -> resolve(load, name, "glPointParameteriv"); + case "glPolygonOffsetClamp" -> resolve(load, name, "glPolygonOffsetClampEXT"); + case "glPolygonOffsetClampEXT" -> resolve(load, name, "glPolygonOffsetClamp"); + case "glPrioritizeTextures" -> resolve(load, name, "glPrioritizeTexturesEXT"); + case "glPrioritizeTexturesEXT" -> resolve(load, name, "glPrioritizeTextures"); + case "glProgramParameteri" -> resolve(load, name, "glProgramParameteriARB", "glProgramParameteriEXT"); + case "glProgramParameteriARB" -> resolve(load, name, "glProgramParameteri", "glProgramParameteriEXT"); + case "glProgramParameteriEXT" -> resolve(load, name, "glProgramParameteri", "glProgramParameteriARB"); + case "glProgramUniform1f" -> resolve(load, name, "glProgramUniform1fEXT"); + case "glProgramUniform1fEXT" -> resolve(load, name, "glProgramUniform1f"); + case "glProgramUniform1fv" -> resolve(load, name, "glProgramUniform1fvEXT"); + case "glProgramUniform1fvEXT" -> resolve(load, name, "glProgramUniform1fv"); + case "glProgramUniform1i" -> resolve(load, name, "glProgramUniform1iEXT"); + case "glProgramUniform1iEXT" -> resolve(load, name, "glProgramUniform1i"); + case "glProgramUniform1iv" -> resolve(load, name, "glProgramUniform1ivEXT"); + case "glProgramUniform1ivEXT" -> resolve(load, name, "glProgramUniform1iv"); + case "glProgramUniform1ui" -> resolve(load, name, "glProgramUniform1uiEXT"); + case "glProgramUniform1uiEXT" -> resolve(load, name, "glProgramUniform1ui"); + case "glProgramUniform1uiv" -> resolve(load, name, "glProgramUniform1uivEXT"); + case "glProgramUniform1uivEXT" -> resolve(load, name, "glProgramUniform1uiv"); + case "glProgramUniform2f" -> resolve(load, name, "glProgramUniform2fEXT"); + case "glProgramUniform2fEXT" -> resolve(load, name, "glProgramUniform2f"); + case "glProgramUniform2fv" -> resolve(load, name, "glProgramUniform2fvEXT"); + case "glProgramUniform2fvEXT" -> resolve(load, name, "glProgramUniform2fv"); + case "glProgramUniform2i" -> resolve(load, name, "glProgramUniform2iEXT"); + case "glProgramUniform2iEXT" -> resolve(load, name, "glProgramUniform2i"); + case "glProgramUniform2iv" -> resolve(load, name, "glProgramUniform2ivEXT"); + case "glProgramUniform2ivEXT" -> resolve(load, name, "glProgramUniform2iv"); + case "glProgramUniform2ui" -> resolve(load, name, "glProgramUniform2uiEXT"); + case "glProgramUniform2uiEXT" -> resolve(load, name, "glProgramUniform2ui"); + case "glProgramUniform2uiv" -> resolve(load, name, "glProgramUniform2uivEXT"); + case "glProgramUniform2uivEXT" -> resolve(load, name, "glProgramUniform2uiv"); + case "glProgramUniform3f" -> resolve(load, name, "glProgramUniform3fEXT"); + case "glProgramUniform3fEXT" -> resolve(load, name, "glProgramUniform3f"); + case "glProgramUniform3fv" -> resolve(load, name, "glProgramUniform3fvEXT"); + case "glProgramUniform3fvEXT" -> resolve(load, name, "glProgramUniform3fv"); + case "glProgramUniform3i" -> resolve(load, name, "glProgramUniform3iEXT"); + case "glProgramUniform3iEXT" -> resolve(load, name, "glProgramUniform3i"); + case "glProgramUniform3iv" -> resolve(load, name, "glProgramUniform3ivEXT"); + case "glProgramUniform3ivEXT" -> resolve(load, name, "glProgramUniform3iv"); + case "glProgramUniform3ui" -> resolve(load, name, "glProgramUniform3uiEXT"); + case "glProgramUniform3uiEXT" -> resolve(load, name, "glProgramUniform3ui"); + case "glProgramUniform3uiv" -> resolve(load, name, "glProgramUniform3uivEXT"); + case "glProgramUniform3uivEXT" -> resolve(load, name, "glProgramUniform3uiv"); + case "glProgramUniform4f" -> resolve(load, name, "glProgramUniform4fEXT"); + case "glProgramUniform4fEXT" -> resolve(load, name, "glProgramUniform4f"); + case "glProgramUniform4fv" -> resolve(load, name, "glProgramUniform4fvEXT"); + case "glProgramUniform4fvEXT" -> resolve(load, name, "glProgramUniform4fv"); + case "glProgramUniform4i" -> resolve(load, name, "glProgramUniform4iEXT"); + case "glProgramUniform4iEXT" -> resolve(load, name, "glProgramUniform4i"); + case "glProgramUniform4iv" -> resolve(load, name, "glProgramUniform4ivEXT"); + case "glProgramUniform4ivEXT" -> resolve(load, name, "glProgramUniform4iv"); + case "glProgramUniform4ui" -> resolve(load, name, "glProgramUniform4uiEXT"); + case "glProgramUniform4uiEXT" -> resolve(load, name, "glProgramUniform4ui"); + case "glProgramUniform4uiv" -> resolve(load, name, "glProgramUniform4uivEXT"); + case "glProgramUniform4uivEXT" -> resolve(load, name, "glProgramUniform4uiv"); + case "glProgramUniformMatrix2fv" -> resolve(load, name, "glProgramUniformMatrix2fvEXT"); + case "glProgramUniformMatrix2fvEXT" -> resolve(load, name, "glProgramUniformMatrix2fv"); + case "glProgramUniformMatrix2x3fv" -> resolve(load, name, "glProgramUniformMatrix2x3fvEXT"); + case "glProgramUniformMatrix2x3fvEXT" -> resolve(load, name, "glProgramUniformMatrix2x3fv"); + case "glProgramUniformMatrix2x4fv" -> resolve(load, name, "glProgramUniformMatrix2x4fvEXT"); + case "glProgramUniformMatrix2x4fvEXT" -> resolve(load, name, "glProgramUniformMatrix2x4fv"); + case "glProgramUniformMatrix3fv" -> resolve(load, name, "glProgramUniformMatrix3fvEXT"); + case "glProgramUniformMatrix3fvEXT" -> resolve(load, name, "glProgramUniformMatrix3fv"); + case "glProgramUniformMatrix3x2fv" -> resolve(load, name, "glProgramUniformMatrix3x2fvEXT"); + case "glProgramUniformMatrix3x2fvEXT" -> resolve(load, name, "glProgramUniformMatrix3x2fv"); + case "glProgramUniformMatrix3x4fv" -> resolve(load, name, "glProgramUniformMatrix3x4fvEXT"); + case "glProgramUniformMatrix3x4fvEXT" -> resolve(load, name, "glProgramUniformMatrix3x4fv"); + case "glProgramUniformMatrix4fv" -> resolve(load, name, "glProgramUniformMatrix4fvEXT"); + case "glProgramUniformMatrix4fvEXT" -> resolve(load, name, "glProgramUniformMatrix4fv"); + case "glProgramUniformMatrix4x2fv" -> resolve(load, name, "glProgramUniformMatrix4x2fvEXT"); + case "glProgramUniformMatrix4x2fvEXT" -> resolve(load, name, "glProgramUniformMatrix4x2fv"); + case "glProgramUniformMatrix4x3fv" -> resolve(load, name, "glProgramUniformMatrix4x3fvEXT"); + case "glProgramUniformMatrix4x3fvEXT" -> resolve(load, name, "glProgramUniformMatrix4x3fv"); + case "glProvokingVertex" -> resolve(load, name, "glProvokingVertexEXT"); + case "glProvokingVertexEXT" -> resolve(load, name, "glProvokingVertex"); + case "glReadnPixels" -> resolve(load, name, "glReadnPixelsARB"); + case "glReadnPixelsARB" -> resolve(load, name, "glReadnPixels"); + case "glRenderbufferStorage" -> resolve(load, name, "glRenderbufferStorageEXT"); + case "glRenderbufferStorageEXT" -> resolve(load, name, "glRenderbufferStorage"); + case "glRenderbufferStorageMultisample" -> resolve(load, name, "glRenderbufferStorageMultisampleEXT"); + case "glRenderbufferStorageMultisampleEXT" -> resolve(load, name, "glRenderbufferStorageMultisample"); + case "glResetHistogram" -> resolve(load, name, "glResetHistogramEXT"); + case "glResetHistogramEXT" -> resolve(load, name, "glResetHistogram"); + case "glResetMinmax" -> resolve(load, name, "glResetMinmaxEXT"); + case "glResetMinmaxEXT" -> resolve(load, name, "glResetMinmax"); + case "glResumeTransformFeedback" -> resolve(load, name, "glResumeTransformFeedbackNV"); + case "glResumeTransformFeedbackNV" -> resolve(load, name, "glResumeTransformFeedback"); + case "glSampleCoverage" -> resolve(load, name, "glSampleCoverageARB"); + case "glSampleCoverageARB" -> resolve(load, name, "glSampleCoverage"); + case "glSampleMaskEXT" -> resolve(load, name, "glSampleMaskSGIS"); + case "glSampleMaskSGIS" -> resolve(load, name, "glSampleMaskEXT"); + case "glSamplePatternEXT" -> resolve(load, name, "glSamplePatternSGIS"); + case "glSamplePatternSGIS" -> resolve(load, name, "glSamplePatternEXT"); + case "glSecondaryColor3b" -> resolve(load, name, "glSecondaryColor3bEXT"); + case "glSecondaryColor3bEXT" -> resolve(load, name, "glSecondaryColor3b"); + case "glSecondaryColor3bv" -> resolve(load, name, "glSecondaryColor3bvEXT"); + case "glSecondaryColor3bvEXT" -> resolve(load, name, "glSecondaryColor3bv"); + case "glSecondaryColor3d" -> resolve(load, name, "glSecondaryColor3dEXT"); + case "glSecondaryColor3dEXT" -> resolve(load, name, "glSecondaryColor3d"); + case "glSecondaryColor3dv" -> resolve(load, name, "glSecondaryColor3dvEXT"); + case "glSecondaryColor3dvEXT" -> resolve(load, name, "glSecondaryColor3dv"); + case "glSecondaryColor3f" -> resolve(load, name, "glSecondaryColor3fEXT"); + case "glSecondaryColor3fEXT" -> resolve(load, name, "glSecondaryColor3f"); + case "glSecondaryColor3fv" -> resolve(load, name, "glSecondaryColor3fvEXT"); + case "glSecondaryColor3fvEXT" -> resolve(load, name, "glSecondaryColor3fv"); + case "glSecondaryColor3i" -> resolve(load, name, "glSecondaryColor3iEXT"); + case "glSecondaryColor3iEXT" -> resolve(load, name, "glSecondaryColor3i"); + case "glSecondaryColor3iv" -> resolve(load, name, "glSecondaryColor3ivEXT"); + case "glSecondaryColor3ivEXT" -> resolve(load, name, "glSecondaryColor3iv"); + case "glSecondaryColor3s" -> resolve(load, name, "glSecondaryColor3sEXT"); + case "glSecondaryColor3sEXT" -> resolve(load, name, "glSecondaryColor3s"); + case "glSecondaryColor3sv" -> resolve(load, name, "glSecondaryColor3svEXT"); + case "glSecondaryColor3svEXT" -> resolve(load, name, "glSecondaryColor3sv"); + case "glSecondaryColor3ub" -> resolve(load, name, "glSecondaryColor3ubEXT"); + case "glSecondaryColor3ubEXT" -> resolve(load, name, "glSecondaryColor3ub"); + case "glSecondaryColor3ubv" -> resolve(load, name, "glSecondaryColor3ubvEXT"); + case "glSecondaryColor3ubvEXT" -> resolve(load, name, "glSecondaryColor3ubv"); + case "glSecondaryColor3ui" -> resolve(load, name, "glSecondaryColor3uiEXT"); + case "glSecondaryColor3uiEXT" -> resolve(load, name, "glSecondaryColor3ui"); + case "glSecondaryColor3uiv" -> resolve(load, name, "glSecondaryColor3uivEXT"); + case "glSecondaryColor3uivEXT" -> resolve(load, name, "glSecondaryColor3uiv"); + case "glSecondaryColor3us" -> resolve(load, name, "glSecondaryColor3usEXT"); + case "glSecondaryColor3usEXT" -> resolve(load, name, "glSecondaryColor3us"); + case "glSecondaryColor3usv" -> resolve(load, name, "glSecondaryColor3usvEXT"); + case "glSecondaryColor3usvEXT" -> resolve(load, name, "glSecondaryColor3usv"); + case "glSecondaryColorPointer" -> resolve(load, name, "glSecondaryColorPointerEXT"); + case "glSecondaryColorPointerEXT" -> resolve(load, name, "glSecondaryColorPointer"); + case "glSeparableFilter2D" -> resolve(load, name, "glSeparableFilter2DEXT"); + case "glSeparableFilter2DEXT" -> resolve(load, name, "glSeparableFilter2D"); + case "glShaderSource" -> resolve(load, name, "glShaderSourceARB"); + case "glShaderSourceARB" -> resolve(load, name, "glShaderSource"); + case "glSpecializeShader" -> resolve(load, name, "glSpecializeShaderARB"); + case "glSpecializeShaderARB" -> resolve(load, name, "glSpecializeShader"); + case "glStencilOpSeparate" -> resolve(load, name, "glStencilOpSeparateATI"); + case "glStencilOpSeparateATI" -> resolve(load, name, "glStencilOpSeparate"); + case "glTexBuffer" -> resolve(load, name, "glTexBufferARB", "glTexBufferEXT"); + case "glTexBufferARB" -> resolve(load, name, "glTexBuffer", "glTexBufferEXT"); + case "glTexBufferEXT" -> resolve(load, name, "glTexBuffer", "glTexBufferARB"); + case "glTexImage3D" -> resolve(load, name, "glTexImage3DEXT"); + case "glTexImage3DEXT" -> resolve(load, name, "glTexImage3D"); + case "glTexParameterIiv" -> resolve(load, name, "glTexParameterIivEXT"); + case "glTexParameterIivEXT" -> resolve(load, name, "glTexParameterIiv"); + case "glTexParameterIuiv" -> resolve(load, name, "glTexParameterIuivEXT"); + case "glTexParameterIuivEXT" -> resolve(load, name, "glTexParameterIuiv"); + case "glTexStorage1D" -> resolve(load, name, "glTexStorage1DEXT"); + case "glTexStorage1DEXT" -> resolve(load, name, "glTexStorage1D"); + case "glTexStorage2D" -> resolve(load, name, "glTexStorage2DEXT"); + case "glTexStorage2DEXT" -> resolve(load, name, "glTexStorage2D"); + case "glTexStorage3D" -> resolve(load, name, "glTexStorage3DEXT"); + case "glTexStorage3DEXT" -> resolve(load, name, "glTexStorage3D"); + case "glTexSubImage1D" -> resolve(load, name, "glTexSubImage1DEXT"); + case "glTexSubImage1DEXT" -> resolve(load, name, "glTexSubImage1D"); + case "glTexSubImage2D" -> resolve(load, name, "glTexSubImage2DEXT"); + case "glTexSubImage2DEXT" -> resolve(load, name, "glTexSubImage2D"); + case "glTexSubImage3D" -> resolve(load, name, "glTexSubImage3DEXT"); + case "glTexSubImage3DEXT" -> resolve(load, name, "glTexSubImage3D"); + case "glTransformFeedbackVaryings" -> resolve(load, name, "glTransformFeedbackVaryingsEXT"); + case "glTransformFeedbackVaryingsEXT" -> resolve(load, name, "glTransformFeedbackVaryings"); + case "glUniform1f" -> resolve(load, name, "glUniform1fARB"); + case "glUniform1fARB" -> resolve(load, name, "glUniform1f"); + case "glUniform1fv" -> resolve(load, name, "glUniform1fvARB"); + case "glUniform1fvARB" -> resolve(load, name, "glUniform1fv"); + case "glUniform1i" -> resolve(load, name, "glUniform1iARB"); + case "glUniform1iARB" -> resolve(load, name, "glUniform1i"); + case "glUniform1iv" -> resolve(load, name, "glUniform1ivARB"); + case "glUniform1ivARB" -> resolve(load, name, "glUniform1iv"); + case "glUniform1ui" -> resolve(load, name, "glUniform1uiEXT"); + case "glUniform1uiEXT" -> resolve(load, name, "glUniform1ui"); + case "glUniform1uiv" -> resolve(load, name, "glUniform1uivEXT"); + case "glUniform1uivEXT" -> resolve(load, name, "glUniform1uiv"); + case "glUniform2f" -> resolve(load, name, "glUniform2fARB"); + case "glUniform2fARB" -> resolve(load, name, "glUniform2f"); + case "glUniform2fv" -> resolve(load, name, "glUniform2fvARB"); + case "glUniform2fvARB" -> resolve(load, name, "glUniform2fv"); + case "glUniform2i" -> resolve(load, name, "glUniform2iARB"); + case "glUniform2iARB" -> resolve(load, name, "glUniform2i"); + case "glUniform2iv" -> resolve(load, name, "glUniform2ivARB"); + case "glUniform2ivARB" -> resolve(load, name, "glUniform2iv"); + case "glUniform2ui" -> resolve(load, name, "glUniform2uiEXT"); + case "glUniform2uiEXT" -> resolve(load, name, "glUniform2ui"); + case "glUniform2uiv" -> resolve(load, name, "glUniform2uivEXT"); + case "glUniform2uivEXT" -> resolve(load, name, "glUniform2uiv"); + case "glUniform3f" -> resolve(load, name, "glUniform3fARB"); + case "glUniform3fARB" -> resolve(load, name, "glUniform3f"); + case "glUniform3fv" -> resolve(load, name, "glUniform3fvARB"); + case "glUniform3fvARB" -> resolve(load, name, "glUniform3fv"); + case "glUniform3i" -> resolve(load, name, "glUniform3iARB"); + case "glUniform3iARB" -> resolve(load, name, "glUniform3i"); + case "glUniform3iv" -> resolve(load, name, "glUniform3ivARB"); + case "glUniform3ivARB" -> resolve(load, name, "glUniform3iv"); + case "glUniform3ui" -> resolve(load, name, "glUniform3uiEXT"); + case "glUniform3uiEXT" -> resolve(load, name, "glUniform3ui"); + case "glUniform3uiv" -> resolve(load, name, "glUniform3uivEXT"); + case "glUniform3uivEXT" -> resolve(load, name, "glUniform3uiv"); + case "glUniform4f" -> resolve(load, name, "glUniform4fARB"); + case "glUniform4fARB" -> resolve(load, name, "glUniform4f"); + case "glUniform4fv" -> resolve(load, name, "glUniform4fvARB"); + case "glUniform4fvARB" -> resolve(load, name, "glUniform4fv"); + case "glUniform4i" -> resolve(load, name, "glUniform4iARB"); + case "glUniform4iARB" -> resolve(load, name, "glUniform4i"); + case "glUniform4iv" -> resolve(load, name, "glUniform4ivARB"); + case "glUniform4ivARB" -> resolve(load, name, "glUniform4iv"); + case "glUniform4ui" -> resolve(load, name, "glUniform4uiEXT"); + case "glUniform4uiEXT" -> resolve(load, name, "glUniform4ui"); + case "glUniform4uiv" -> resolve(load, name, "glUniform4uivEXT"); + case "glUniform4uivEXT" -> resolve(load, name, "glUniform4uiv"); + case "glUniformMatrix2fv" -> resolve(load, name, "glUniformMatrix2fvARB"); + case "glUniformMatrix2fvARB" -> resolve(load, name, "glUniformMatrix2fv"); + case "glUniformMatrix3fv" -> resolve(load, name, "glUniformMatrix3fvARB"); + case "glUniformMatrix3fvARB" -> resolve(load, name, "glUniformMatrix3fv"); + case "glUniformMatrix4fv" -> resolve(load, name, "glUniformMatrix4fvARB"); + case "glUniformMatrix4fvARB" -> resolve(load, name, "glUniformMatrix4fv"); + case "glUnmapBuffer" -> resolve(load, name, "glUnmapBufferARB"); + case "glUnmapBufferARB" -> resolve(load, name, "glUnmapBuffer"); + case "glUseProgram" -> resolve(load, name, "glUseProgramObjectARB"); + case "glUseProgramObjectARB" -> resolve(load, name, "glUseProgram"); + case "glValidateProgram" -> resolve(load, name, "glValidateProgramARB"); + case "glValidateProgramARB" -> resolve(load, name, "glValidateProgram"); + case "glVertexAttrib1d" -> resolve(load, name, "glVertexAttrib1dARB", "glVertexAttrib1dNV"); + case "glVertexAttrib1dARB" -> resolve(load, name, "glVertexAttrib1d", "glVertexAttrib1dNV"); + case "glVertexAttrib1dNV" -> resolve(load, name, "glVertexAttrib1d", "glVertexAttrib1dARB"); + case "glVertexAttrib1dv" -> resolve(load, name, "glVertexAttrib1dvARB", "glVertexAttrib1dvNV"); + case "glVertexAttrib1dvARB" -> resolve(load, name, "glVertexAttrib1dv", "glVertexAttrib1dvNV"); + case "glVertexAttrib1dvNV" -> resolve(load, name, "glVertexAttrib1dv", "glVertexAttrib1dvARB"); + case "glVertexAttrib1f" -> resolve(load, name, "glVertexAttrib1fARB", "glVertexAttrib1fNV"); + case "glVertexAttrib1fARB" -> resolve(load, name, "glVertexAttrib1f", "glVertexAttrib1fNV"); + case "glVertexAttrib1fNV" -> resolve(load, name, "glVertexAttrib1f", "glVertexAttrib1fARB"); + case "glVertexAttrib1fv" -> resolve(load, name, "glVertexAttrib1fvARB", "glVertexAttrib1fvNV"); + case "glVertexAttrib1fvARB" -> resolve(load, name, "glVertexAttrib1fv", "glVertexAttrib1fvNV"); + case "glVertexAttrib1fvNV" -> resolve(load, name, "glVertexAttrib1fv", "glVertexAttrib1fvARB"); + case "glVertexAttrib1s" -> resolve(load, name, "glVertexAttrib1sARB", "glVertexAttrib1sNV"); + case "glVertexAttrib1sARB" -> resolve(load, name, "glVertexAttrib1s", "glVertexAttrib1sNV"); + case "glVertexAttrib1sNV" -> resolve(load, name, "glVertexAttrib1s", "glVertexAttrib1sARB"); + case "glVertexAttrib1sv" -> resolve(load, name, "glVertexAttrib1svARB", "glVertexAttrib1svNV"); + case "glVertexAttrib1svARB" -> resolve(load, name, "glVertexAttrib1sv", "glVertexAttrib1svNV"); + case "glVertexAttrib1svNV" -> resolve(load, name, "glVertexAttrib1sv", "glVertexAttrib1svARB"); + case "glVertexAttrib2d" -> resolve(load, name, "glVertexAttrib2dARB", "glVertexAttrib2dNV"); + case "glVertexAttrib2dARB" -> resolve(load, name, "glVertexAttrib2d", "glVertexAttrib2dNV"); + case "glVertexAttrib2dNV" -> resolve(load, name, "glVertexAttrib2d", "glVertexAttrib2dARB"); + case "glVertexAttrib2dv" -> resolve(load, name, "glVertexAttrib2dvARB", "glVertexAttrib2dvNV"); + case "glVertexAttrib2dvARB" -> resolve(load, name, "glVertexAttrib2dv", "glVertexAttrib2dvNV"); + case "glVertexAttrib2dvNV" -> resolve(load, name, "glVertexAttrib2dv", "glVertexAttrib2dvARB"); + case "glVertexAttrib2f" -> resolve(load, name, "glVertexAttrib2fARB", "glVertexAttrib2fNV"); + case "glVertexAttrib2fARB" -> resolve(load, name, "glVertexAttrib2f", "glVertexAttrib2fNV"); + case "glVertexAttrib2fNV" -> resolve(load, name, "glVertexAttrib2f", "glVertexAttrib2fARB"); + case "glVertexAttrib2fv" -> resolve(load, name, "glVertexAttrib2fvARB", "glVertexAttrib2fvNV"); + case "glVertexAttrib2fvARB" -> resolve(load, name, "glVertexAttrib2fv", "glVertexAttrib2fvNV"); + case "glVertexAttrib2fvNV" -> resolve(load, name, "glVertexAttrib2fv", "glVertexAttrib2fvARB"); + case "glVertexAttrib2s" -> resolve(load, name, "glVertexAttrib2sARB", "glVertexAttrib2sNV"); + case "glVertexAttrib2sARB" -> resolve(load, name, "glVertexAttrib2s", "glVertexAttrib2sNV"); + case "glVertexAttrib2sNV" -> resolve(load, name, "glVertexAttrib2s", "glVertexAttrib2sARB"); + case "glVertexAttrib2sv" -> resolve(load, name, "glVertexAttrib2svARB", "glVertexAttrib2svNV"); + case "glVertexAttrib2svARB" -> resolve(load, name, "glVertexAttrib2sv", "glVertexAttrib2svNV"); + case "glVertexAttrib2svNV" -> resolve(load, name, "glVertexAttrib2sv", "glVertexAttrib2svARB"); + case "glVertexAttrib3d" -> resolve(load, name, "glVertexAttrib3dARB", "glVertexAttrib3dNV"); + case "glVertexAttrib3dARB" -> resolve(load, name, "glVertexAttrib3d", "glVertexAttrib3dNV"); + case "glVertexAttrib3dNV" -> resolve(load, name, "glVertexAttrib3d", "glVertexAttrib3dARB"); + case "glVertexAttrib3dv" -> resolve(load, name, "glVertexAttrib3dvARB", "glVertexAttrib3dvNV"); + case "glVertexAttrib3dvARB" -> resolve(load, name, "glVertexAttrib3dv", "glVertexAttrib3dvNV"); + case "glVertexAttrib3dvNV" -> resolve(load, name, "glVertexAttrib3dv", "glVertexAttrib3dvARB"); + case "glVertexAttrib3f" -> resolve(load, name, "glVertexAttrib3fARB", "glVertexAttrib3fNV"); + case "glVertexAttrib3fARB" -> resolve(load, name, "glVertexAttrib3f", "glVertexAttrib3fNV"); + case "glVertexAttrib3fNV" -> resolve(load, name, "glVertexAttrib3f", "glVertexAttrib3fARB"); + case "glVertexAttrib3fv" -> resolve(load, name, "glVertexAttrib3fvARB", "glVertexAttrib3fvNV"); + case "glVertexAttrib3fvARB" -> resolve(load, name, "glVertexAttrib3fv", "glVertexAttrib3fvNV"); + case "glVertexAttrib3fvNV" -> resolve(load, name, "glVertexAttrib3fv", "glVertexAttrib3fvARB"); + case "glVertexAttrib3s" -> resolve(load, name, "glVertexAttrib3sARB", "glVertexAttrib3sNV"); + case "glVertexAttrib3sARB" -> resolve(load, name, "glVertexAttrib3s", "glVertexAttrib3sNV"); + case "glVertexAttrib3sNV" -> resolve(load, name, "glVertexAttrib3s", "glVertexAttrib3sARB"); + case "glVertexAttrib3sv" -> resolve(load, name, "glVertexAttrib3svARB", "glVertexAttrib3svNV"); + case "glVertexAttrib3svARB" -> resolve(load, name, "glVertexAttrib3sv", "glVertexAttrib3svNV"); + case "glVertexAttrib3svNV" -> resolve(load, name, "glVertexAttrib3sv", "glVertexAttrib3svARB"); + case "glVertexAttrib4bv" -> resolve(load, name, "glVertexAttrib4bvARB"); + case "glVertexAttrib4bvARB" -> resolve(load, name, "glVertexAttrib4bv"); + case "glVertexAttrib4d" -> resolve(load, name, "glVertexAttrib4dARB", "glVertexAttrib4dNV"); + case "glVertexAttrib4dARB" -> resolve(load, name, "glVertexAttrib4d", "glVertexAttrib4dNV"); + case "glVertexAttrib4dNV" -> resolve(load, name, "glVertexAttrib4d", "glVertexAttrib4dARB"); + case "glVertexAttrib4dv" -> resolve(load, name, "glVertexAttrib4dvARB", "glVertexAttrib4dvNV"); + case "glVertexAttrib4dvARB" -> resolve(load, name, "glVertexAttrib4dv", "glVertexAttrib4dvNV"); + case "glVertexAttrib4dvNV" -> resolve(load, name, "glVertexAttrib4dv", "glVertexAttrib4dvARB"); + case "glVertexAttrib4f" -> resolve(load, name, "glVertexAttrib4fARB", "glVertexAttrib4fNV"); + case "glVertexAttrib4fARB" -> resolve(load, name, "glVertexAttrib4f", "glVertexAttrib4fNV"); + case "glVertexAttrib4fNV" -> resolve(load, name, "glVertexAttrib4f", "glVertexAttrib4fARB"); + case "glVertexAttrib4fv" -> resolve(load, name, "glVertexAttrib4fvARB", "glVertexAttrib4fvNV"); + case "glVertexAttrib4fvARB" -> resolve(load, name, "glVertexAttrib4fv", "glVertexAttrib4fvNV"); + case "glVertexAttrib4fvNV" -> resolve(load, name, "glVertexAttrib4fv", "glVertexAttrib4fvARB"); + case "glVertexAttrib4iv" -> resolve(load, name, "glVertexAttrib4ivARB"); + case "glVertexAttrib4ivARB" -> resolve(load, name, "glVertexAttrib4iv"); + case "glVertexAttrib4Nbv" -> resolve(load, name, "glVertexAttrib4NbvARB"); + case "glVertexAttrib4NbvARB" -> resolve(load, name, "glVertexAttrib4Nbv"); + case "glVertexAttrib4Niv" -> resolve(load, name, "glVertexAttrib4NivARB"); + case "glVertexAttrib4NivARB" -> resolve(load, name, "glVertexAttrib4Niv"); + case "glVertexAttrib4Nsv" -> resolve(load, name, "glVertexAttrib4NsvARB"); + case "glVertexAttrib4NsvARB" -> resolve(load, name, "glVertexAttrib4Nsv"); + case "glVertexAttrib4Nub" -> resolve(load, name, "glVertexAttrib4NubARB", "glVertexAttrib4ubNV"); + case "glVertexAttrib4NubARB" -> resolve(load, name, "glVertexAttrib4Nub", "glVertexAttrib4ubNV"); + case "glVertexAttrib4Nubv" -> resolve(load, name, "glVertexAttrib4NubvARB", "glVertexAttrib4ubvNV"); + case "glVertexAttrib4NubvARB" -> resolve(load, name, "glVertexAttrib4Nubv", "glVertexAttrib4ubvNV"); + case "glVertexAttrib4Nuiv" -> resolve(load, name, "glVertexAttrib4NuivARB"); + case "glVertexAttrib4NuivARB" -> resolve(load, name, "glVertexAttrib4Nuiv"); + case "glVertexAttrib4Nusv" -> resolve(load, name, "glVertexAttrib4NusvARB"); + case "glVertexAttrib4NusvARB" -> resolve(load, name, "glVertexAttrib4Nusv"); + case "glVertexAttrib4s" -> resolve(load, name, "glVertexAttrib4sARB", "glVertexAttrib4sNV"); + case "glVertexAttrib4sARB" -> resolve(load, name, "glVertexAttrib4s", "glVertexAttrib4sNV"); + case "glVertexAttrib4sNV" -> resolve(load, name, "glVertexAttrib4s", "glVertexAttrib4sARB"); + case "glVertexAttrib4sv" -> resolve(load, name, "glVertexAttrib4svARB", "glVertexAttrib4svNV"); + case "glVertexAttrib4svARB" -> resolve(load, name, "glVertexAttrib4sv", "glVertexAttrib4svNV"); + case "glVertexAttrib4svNV" -> resolve(load, name, "glVertexAttrib4sv", "glVertexAttrib4svARB"); + case "glVertexAttrib4ubNV" -> resolve(load, name, "glVertexAttrib4Nub", "glVertexAttrib4NubARB"); + case "glVertexAttrib4ubv" -> resolve(load, name, "glVertexAttrib4ubvARB"); + case "glVertexAttrib4ubvARB" -> resolve(load, name, "glVertexAttrib4ubv"); + case "glVertexAttrib4ubvNV" -> resolve(load, name, "glVertexAttrib4Nubv", "glVertexAttrib4NubvARB"); + case "glVertexAttrib4uiv" -> resolve(load, name, "glVertexAttrib4uivARB"); + case "glVertexAttrib4uivARB" -> resolve(load, name, "glVertexAttrib4uiv"); + case "glVertexAttrib4usv" -> resolve(load, name, "glVertexAttrib4usvARB"); + case "glVertexAttrib4usvARB" -> resolve(load, name, "glVertexAttrib4usv"); + case "glVertexAttribDivisor" -> resolve(load, name, "glVertexAttribDivisorARB"); + case "glVertexAttribDivisorARB" -> resolve(load, name, "glVertexAttribDivisor"); + case "glVertexAttribI1i" -> resolve(load, name, "glVertexAttribI1iEXT"); + case "glVertexAttribI1iEXT" -> resolve(load, name, "glVertexAttribI1i"); + case "glVertexAttribI1iv" -> resolve(load, name, "glVertexAttribI1ivEXT"); + case "glVertexAttribI1ivEXT" -> resolve(load, name, "glVertexAttribI1iv"); + case "glVertexAttribI1ui" -> resolve(load, name, "glVertexAttribI1uiEXT"); + case "glVertexAttribI1uiEXT" -> resolve(load, name, "glVertexAttribI1ui"); + case "glVertexAttribI1uiv" -> resolve(load, name, "glVertexAttribI1uivEXT"); + case "glVertexAttribI1uivEXT" -> resolve(load, name, "glVertexAttribI1uiv"); + case "glVertexAttribI2i" -> resolve(load, name, "glVertexAttribI2iEXT"); + case "glVertexAttribI2iEXT" -> resolve(load, name, "glVertexAttribI2i"); + case "glVertexAttribI2iv" -> resolve(load, name, "glVertexAttribI2ivEXT"); + case "glVertexAttribI2ivEXT" -> resolve(load, name, "glVertexAttribI2iv"); + case "glVertexAttribI2ui" -> resolve(load, name, "glVertexAttribI2uiEXT"); + case "glVertexAttribI2uiEXT" -> resolve(load, name, "glVertexAttribI2ui"); + case "glVertexAttribI2uiv" -> resolve(load, name, "glVertexAttribI2uivEXT"); + case "glVertexAttribI2uivEXT" -> resolve(load, name, "glVertexAttribI2uiv"); + case "glVertexAttribI3i" -> resolve(load, name, "glVertexAttribI3iEXT"); + case "glVertexAttribI3iEXT" -> resolve(load, name, "glVertexAttribI3i"); + case "glVertexAttribI3iv" -> resolve(load, name, "glVertexAttribI3ivEXT"); + case "glVertexAttribI3ivEXT" -> resolve(load, name, "glVertexAttribI3iv"); + case "glVertexAttribI3ui" -> resolve(load, name, "glVertexAttribI3uiEXT"); + case "glVertexAttribI3uiEXT" -> resolve(load, name, "glVertexAttribI3ui"); + case "glVertexAttribI3uiv" -> resolve(load, name, "glVertexAttribI3uivEXT"); + case "glVertexAttribI3uivEXT" -> resolve(load, name, "glVertexAttribI3uiv"); + case "glVertexAttribI4bv" -> resolve(load, name, "glVertexAttribI4bvEXT"); + case "glVertexAttribI4bvEXT" -> resolve(load, name, "glVertexAttribI4bv"); + case "glVertexAttribI4i" -> resolve(load, name, "glVertexAttribI4iEXT"); + case "glVertexAttribI4iEXT" -> resolve(load, name, "glVertexAttribI4i"); + case "glVertexAttribI4iv" -> resolve(load, name, "glVertexAttribI4ivEXT"); + case "glVertexAttribI4ivEXT" -> resolve(load, name, "glVertexAttribI4iv"); + case "glVertexAttribI4sv" -> resolve(load, name, "glVertexAttribI4svEXT"); + case "glVertexAttribI4svEXT" -> resolve(load, name, "glVertexAttribI4sv"); + case "glVertexAttribI4ubv" -> resolve(load, name, "glVertexAttribI4ubvEXT"); + case "glVertexAttribI4ubvEXT" -> resolve(load, name, "glVertexAttribI4ubv"); + case "glVertexAttribI4ui" -> resolve(load, name, "glVertexAttribI4uiEXT"); + case "glVertexAttribI4uiEXT" -> resolve(load, name, "glVertexAttribI4ui"); + case "glVertexAttribI4uiv" -> resolve(load, name, "glVertexAttribI4uivEXT"); + case "glVertexAttribI4uivEXT" -> resolve(load, name, "glVertexAttribI4uiv"); + case "glVertexAttribI4usv" -> resolve(load, name, "glVertexAttribI4usvEXT"); + case "glVertexAttribI4usvEXT" -> resolve(load, name, "glVertexAttribI4usv"); + case "glVertexAttribIPointer" -> resolve(load, name, "glVertexAttribIPointerEXT"); + case "glVertexAttribIPointerEXT" -> resolve(load, name, "glVertexAttribIPointer"); + case "glVertexAttribL1d" -> resolve(load, name, "glVertexAttribL1dEXT"); + case "glVertexAttribL1dEXT" -> resolve(load, name, "glVertexAttribL1d"); + case "glVertexAttribL1dv" -> resolve(load, name, "glVertexAttribL1dvEXT"); + case "glVertexAttribL1dvEXT" -> resolve(load, name, "glVertexAttribL1dv"); + case "glVertexAttribL2d" -> resolve(load, name, "glVertexAttribL2dEXT"); + case "glVertexAttribL2dEXT" -> resolve(load, name, "glVertexAttribL2d"); + case "glVertexAttribL2dv" -> resolve(load, name, "glVertexAttribL2dvEXT"); + case "glVertexAttribL2dvEXT" -> resolve(load, name, "glVertexAttribL2dv"); + case "glVertexAttribL3d" -> resolve(load, name, "glVertexAttribL3dEXT"); + case "glVertexAttribL3dEXT" -> resolve(load, name, "glVertexAttribL3d"); + case "glVertexAttribL3dv" -> resolve(load, name, "glVertexAttribL3dvEXT"); + case "glVertexAttribL3dvEXT" -> resolve(load, name, "glVertexAttribL3dv"); + case "glVertexAttribL4d" -> resolve(load, name, "glVertexAttribL4dEXT"); + case "glVertexAttribL4dEXT" -> resolve(load, name, "glVertexAttribL4d"); + case "glVertexAttribL4dv" -> resolve(load, name, "glVertexAttribL4dvEXT"); + case "glVertexAttribL4dvEXT" -> resolve(load, name, "glVertexAttribL4dv"); + case "glVertexAttribLPointer" -> resolve(load, name, "glVertexAttribLPointerEXT"); + case "glVertexAttribLPointerEXT" -> resolve(load, name, "glVertexAttribLPointer"); + case "glVertexAttribPointer" -> resolve(load, name, "glVertexAttribPointerARB"); + case "glVertexAttribPointerARB" -> resolve(load, name, "glVertexAttribPointer"); + case "glWindowPos2d" -> resolve(load, name, "glWindowPos2dARB", "glWindowPos2dMESA"); + case "glWindowPos2dARB" -> resolve(load, name, "glWindowPos2d", "glWindowPos2dMESA"); + case "glWindowPos2dMESA" -> resolve(load, name, "glWindowPos2d", "glWindowPos2dARB"); + case "glWindowPos2dv" -> resolve(load, name, "glWindowPos2dvARB", "glWindowPos2dvMESA"); + case "glWindowPos2dvARB" -> resolve(load, name, "glWindowPos2dv", "glWindowPos2dvMESA"); + case "glWindowPos2dvMESA" -> resolve(load, name, "glWindowPos2dv", "glWindowPos2dvARB"); + case "glWindowPos2f" -> resolve(load, name, "glWindowPos2fARB", "glWindowPos2fMESA"); + case "glWindowPos2fARB" -> resolve(load, name, "glWindowPos2f", "glWindowPos2fMESA"); + case "glWindowPos2fMESA" -> resolve(load, name, "glWindowPos2f", "glWindowPos2fARB"); + case "glWindowPos2fv" -> resolve(load, name, "glWindowPos2fvARB", "glWindowPos2fvMESA"); + case "glWindowPos2fvARB" -> resolve(load, name, "glWindowPos2fv", "glWindowPos2fvMESA"); + case "glWindowPos2fvMESA" -> resolve(load, name, "glWindowPos2fv", "glWindowPos2fvARB"); + case "glWindowPos2i" -> resolve(load, name, "glWindowPos2iARB", "glWindowPos2iMESA"); + case "glWindowPos2iARB" -> resolve(load, name, "glWindowPos2i", "glWindowPos2iMESA"); + case "glWindowPos2iMESA" -> resolve(load, name, "glWindowPos2i", "glWindowPos2iARB"); + case "glWindowPos2iv" -> resolve(load, name, "glWindowPos2ivARB", "glWindowPos2ivMESA"); + case "glWindowPos2ivARB" -> resolve(load, name, "glWindowPos2iv", "glWindowPos2ivMESA"); + case "glWindowPos2ivMESA" -> resolve(load, name, "glWindowPos2iv", "glWindowPos2ivARB"); + case "glWindowPos2s" -> resolve(load, name, "glWindowPos2sARB", "glWindowPos2sMESA"); + case "glWindowPos2sARB" -> resolve(load, name, "glWindowPos2s", "glWindowPos2sMESA"); + case "glWindowPos2sMESA" -> resolve(load, name, "glWindowPos2s", "glWindowPos2sARB"); + case "glWindowPos2sv" -> resolve(load, name, "glWindowPos2svARB", "glWindowPos2svMESA"); + case "glWindowPos2svARB" -> resolve(load, name, "glWindowPos2sv", "glWindowPos2svMESA"); + case "glWindowPos2svMESA" -> resolve(load, name, "glWindowPos2sv", "glWindowPos2svARB"); + case "glWindowPos3d" -> resolve(load, name, "glWindowPos3dARB", "glWindowPos3dMESA"); + case "glWindowPos3dARB" -> resolve(load, name, "glWindowPos3d", "glWindowPos3dMESA"); + case "glWindowPos3dMESA" -> resolve(load, name, "glWindowPos3d", "glWindowPos3dARB"); + case "glWindowPos3dv" -> resolve(load, name, "glWindowPos3dvARB", "glWindowPos3dvMESA"); + case "glWindowPos3dvARB" -> resolve(load, name, "glWindowPos3dv", "glWindowPos3dvMESA"); + case "glWindowPos3dvMESA" -> resolve(load, name, "glWindowPos3dv", "glWindowPos3dvARB"); + case "glWindowPos3f" -> resolve(load, name, "glWindowPos3fARB", "glWindowPos3fMESA"); + case "glWindowPos3fARB" -> resolve(load, name, "glWindowPos3f", "glWindowPos3fMESA"); + case "glWindowPos3fMESA" -> resolve(load, name, "glWindowPos3f", "glWindowPos3fARB"); + case "glWindowPos3fv" -> resolve(load, name, "glWindowPos3fvARB", "glWindowPos3fvMESA"); + case "glWindowPos3fvARB" -> resolve(load, name, "glWindowPos3fv", "glWindowPos3fvMESA"); + case "glWindowPos3fvMESA" -> resolve(load, name, "glWindowPos3fv", "glWindowPos3fvARB"); + case "glWindowPos3i" -> resolve(load, name, "glWindowPos3iARB", "glWindowPos3iMESA"); + case "glWindowPos3iARB" -> resolve(load, name, "glWindowPos3i", "glWindowPos3iMESA"); + case "glWindowPos3iMESA" -> resolve(load, name, "glWindowPos3i", "glWindowPos3iARB"); + case "glWindowPos3iv" -> resolve(load, name, "glWindowPos3ivARB", "glWindowPos3ivMESA"); + case "glWindowPos3ivARB" -> resolve(load, name, "glWindowPos3iv", "glWindowPos3ivMESA"); + case "glWindowPos3ivMESA" -> resolve(load, name, "glWindowPos3iv", "glWindowPos3ivARB"); + case "glWindowPos3s" -> resolve(load, name, "glWindowPos3sARB", "glWindowPos3sMESA"); + case "glWindowPos3sARB" -> resolve(load, name, "glWindowPos3s", "glWindowPos3sMESA"); + case "glWindowPos3sMESA" -> resolve(load, name, "glWindowPos3s", "glWindowPos3sARB"); + case "glWindowPos3sv" -> resolve(load, name, "glWindowPos3svARB", "glWindowPos3svMESA"); + case "glWindowPos3svARB" -> resolve(load, name, "glWindowPos3sv", "glWindowPos3svMESA"); + case "glWindowPos3svMESA" -> resolve(load, name, "glWindowPos3sv", "glWindowPos3svARB"); + case null, default -> MemorySegment.NULL; + }; + } + + private static MemorySegment resolve(GLLoadFunc load, String name, String... aliases) { + final MemorySegment segment = load.invoke(name); + if (!Unmarshal.isNullPointer(segment)) { + return MemorySegment.NULL; + } + for (String alias : aliases) { + final MemorySegment aliasSeg = load.invoke(alias); + if (!Unmarshal.isNullPointer(aliasSeg)) { + return aliasSeg; + } + } + return MemorySegment.NULL; + } +} diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoadFunc.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoadFunc.java index 0dce2c03..06436226 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoadFunc.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoadFunc.java @@ -53,4 +53,13 @@ default SymbolLookup lookup() { return Unmarshal.isNullPointer(segment) ? Optional.empty() : Optional.of(segment); }; } + + /** + * {@return a loading function with alias supports} + * + * @param load the original loading function + */ + static GLLoadFunc withAlias(GLLoadFunc load) { + return string -> GLAliasResolver.resolve(load, string); + } } diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java index a37ead16..9e6a3eb1 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java @@ -602,8 +602,6 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, STBTTAlignedQuad q, int align_to_integer); - // TODO: 2024/1/28 squid233: Support STBRPRect - /** * Calling these functions in sequence is roughly equivalent to calling * stbtt_PackFontRanges(). If you more control over the packing of multiple diff --git a/modules/samples/src/test/java/overrungl/demo/opengl/GL33Test.java b/modules/samples/src/test/java/overrungl/demo/opengl/GL33Test.java index 85185d94..54761a2c 100644 --- a/modules/samples/src/test/java/overrungl/demo/opengl/GL33Test.java +++ b/modules/samples/src/test/java/overrungl/demo/opengl/GL33Test.java @@ -23,10 +23,7 @@ import overrungl.glfw.GLFWCallbacks; import overrungl.glfw.GLFWErrorCallback; import overrungl.joml.Matrixn; -import overrungl.opengl.GL; -import overrungl.opengl.GLFlags; -import overrungl.opengl.GLLoader; -import overrungl.opengl.GLUtil; +import overrungl.opengl.*; import overrungl.opengl.ext.amd.GLAMDDebugOutput; import overrungl.opengl.ext.arb.GLARBDebugOutput; @@ -112,7 +109,7 @@ private void init() { } private void load(Arena arena) { - final GLFlags flags = GLLoader.loadFlags(glfw::getProcAddress); + final GLFlags flags = GLLoader.loadFlags(GLLoadFunc.withAlias(glfw::getProcAddress)); gl = Objects.requireNonNull(GLLoader.load(flags), "Failed to load OpenGL"); debugProc = GLUtil.setupDebugMessageCallback(gl,