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