glad.c (60603B)
1 /* 2 3 OpenGL loader generated by glad 0.1.34 on Sat Mar 20 05:49:53 2021. 4 5 Language/Generator: C/C++ 6 Specification: gl 7 APIs: gl=3.3 8 Profile: core 9 Extensions: 10 GL_KHR_debug 11 Loader: False 12 Local files: False 13 Omit khrplatform: False 14 Reproducible: False 15 16 Commandline: 17 --profile="core" --api="gl=3.3" --generator="c" --spec="gl" --no-loader --extensions="GL_KHR_debug" 18 Online: 19 https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&extensions=GL_KHR_debug 20 */ 21 22 #include <stdio.h> 23 #include <stdlib.h> 24 #include <string.h> 25 #include <glad/glad.h> 26 27 struct gladGLversionStruct GLVersion = { 0, 0 }; 28 29 #if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) 30 #define _GLAD_IS_SOME_NEW_VERSION 1 31 #endif 32 33 static int max_loaded_major; 34 static int max_loaded_minor; 35 36 static const char *exts = NULL; 37 static int num_exts_i = 0; 38 static char **exts_i = NULL; 39 40 static int get_exts(void) { 41 #ifdef _GLAD_IS_SOME_NEW_VERSION 42 if(max_loaded_major < 3) { 43 #endif 44 exts = (const char *)glGetString(GL_EXTENSIONS); 45 #ifdef _GLAD_IS_SOME_NEW_VERSION 46 } else { 47 unsigned int index; 48 49 num_exts_i = 0; 50 glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); 51 if (num_exts_i > 0) { 52 exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i)); 53 } 54 55 if (exts_i == NULL) { 56 return 0; 57 } 58 59 for(index = 0; index < (unsigned)num_exts_i; index++) { 60 const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index); 61 size_t len = strlen(gl_str_tmp); 62 63 char *local_str = (char*)malloc((len+1) * sizeof(char)); 64 if(local_str != NULL) { 65 memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char)); 66 } 67 exts_i[index] = local_str; 68 } 69 } 70 #endif 71 return 1; 72 } 73 74 static void free_exts(void) { 75 if (exts_i != NULL) { 76 int index; 77 for(index = 0; index < num_exts_i; index++) { 78 free((char *)exts_i[index]); 79 } 80 free((void *)exts_i); 81 exts_i = NULL; 82 } 83 } 84 85 static int has_ext(const char *ext) { 86 #ifdef _GLAD_IS_SOME_NEW_VERSION 87 if(max_loaded_major < 3) { 88 #endif 89 const char *extensions; 90 const char *loc; 91 const char *terminator; 92 extensions = exts; 93 if(extensions == NULL || ext == NULL) { 94 return 0; 95 } 96 97 while(1) { 98 loc = strstr(extensions, ext); 99 if(loc == NULL) { 100 return 0; 101 } 102 103 terminator = loc + strlen(ext); 104 if((loc == extensions || *(loc - 1) == ' ') && 105 (*terminator == ' ' || *terminator == '\0')) { 106 return 1; 107 } 108 extensions = terminator; 109 } 110 #ifdef _GLAD_IS_SOME_NEW_VERSION 111 } else { 112 int index; 113 if(exts_i == NULL) return 0; 114 for(index = 0; index < num_exts_i; index++) { 115 const char *e = exts_i[index]; 116 117 if(exts_i[index] != NULL && strcmp(e, ext) == 0) { 118 return 1; 119 } 120 } 121 } 122 #endif 123 124 return 0; 125 } 126 int GLAD_GL_VERSION_1_0 = 0; 127 int GLAD_GL_VERSION_1_1 = 0; 128 int GLAD_GL_VERSION_1_2 = 0; 129 int GLAD_GL_VERSION_1_3 = 0; 130 int GLAD_GL_VERSION_1_4 = 0; 131 int GLAD_GL_VERSION_1_5 = 0; 132 int GLAD_GL_VERSION_2_0 = 0; 133 int GLAD_GL_VERSION_2_1 = 0; 134 int GLAD_GL_VERSION_3_0 = 0; 135 int GLAD_GL_VERSION_3_1 = 0; 136 int GLAD_GL_VERSION_3_2 = 0; 137 int GLAD_GL_VERSION_3_3 = 0; 138 PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL; 139 PFNGLATTACHSHADERPROC glad_glAttachShader = NULL; 140 PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL; 141 PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL; 142 PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL; 143 PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL; 144 PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL; 145 PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL; 146 PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL; 147 PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL; 148 PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL; 149 PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL; 150 PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL; 151 PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL; 152 PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL; 153 PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL; 154 PFNGLBLENDCOLORPROC glad_glBlendColor = NULL; 155 PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL; 156 PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL; 157 PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL; 158 PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL; 159 PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL; 160 PFNGLBUFFERDATAPROC glad_glBufferData = NULL; 161 PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL; 162 PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL; 163 PFNGLCLAMPCOLORPROC glad_glClampColor = NULL; 164 PFNGLCLEARPROC glad_glClear = NULL; 165 PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL; 166 PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL; 167 PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL; 168 PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL; 169 PFNGLCLEARCOLORPROC glad_glClearColor = NULL; 170 PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL; 171 PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL; 172 PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL; 173 PFNGLCOLORMASKPROC glad_glColorMask = NULL; 174 PFNGLCOLORMASKIPROC glad_glColorMaski = NULL; 175 PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL; 176 PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL; 177 PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL; 178 PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL; 179 PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL; 180 PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL; 181 PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL; 182 PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL; 183 PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL; 184 PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL; 185 PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL; 186 PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL; 187 PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL; 188 PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL; 189 PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL; 190 PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL; 191 PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL; 192 PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL; 193 PFNGLCREATESHADERPROC glad_glCreateShader = NULL; 194 PFNGLCULLFACEPROC glad_glCullFace = NULL; 195 PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL; 196 PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL; 197 PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL; 198 PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL; 199 PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL; 200 PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL; 201 PFNGLDELETESHADERPROC glad_glDeleteShader = NULL; 202 PFNGLDELETESYNCPROC glad_glDeleteSync = NULL; 203 PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL; 204 PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL; 205 PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL; 206 PFNGLDEPTHMASKPROC glad_glDepthMask = NULL; 207 PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL; 208 PFNGLDETACHSHADERPROC glad_glDetachShader = NULL; 209 PFNGLDISABLEPROC glad_glDisable = NULL; 210 PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL; 211 PFNGLDISABLEIPROC glad_glDisablei = NULL; 212 PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL; 213 PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL; 214 PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL; 215 PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL; 216 PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL; 217 PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL; 218 PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL; 219 PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL; 220 PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL; 221 PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL; 222 PFNGLENABLEPROC glad_glEnable = NULL; 223 PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL; 224 PFNGLENABLEIPROC glad_glEnablei = NULL; 225 PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL; 226 PFNGLENDQUERYPROC glad_glEndQuery = NULL; 227 PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL; 228 PFNGLFENCESYNCPROC glad_glFenceSync = NULL; 229 PFNGLFINISHPROC glad_glFinish = NULL; 230 PFNGLFLUSHPROC glad_glFlush = NULL; 231 PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL; 232 PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL; 233 PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL; 234 PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL; 235 PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL; 236 PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL; 237 PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL; 238 PFNGLFRONTFACEPROC glad_glFrontFace = NULL; 239 PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL; 240 PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL; 241 PFNGLGENQUERIESPROC glad_glGenQueries = NULL; 242 PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL; 243 PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL; 244 PFNGLGENTEXTURESPROC glad_glGenTextures = NULL; 245 PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL; 246 PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL; 247 PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL; 248 PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL; 249 PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL; 250 PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL; 251 PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL; 252 PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL; 253 PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL; 254 PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL; 255 PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL; 256 PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL; 257 PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL; 258 PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL; 259 PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL; 260 PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL; 261 PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL; 262 PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL; 263 PFNGLGETERRORPROC glad_glGetError = NULL; 264 PFNGLGETFLOATVPROC glad_glGetFloatv = NULL; 265 PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL; 266 PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL; 267 PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL; 268 PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL; 269 PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL; 270 PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL; 271 PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL; 272 PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL; 273 PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL; 274 PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL; 275 PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL; 276 PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL; 277 PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL; 278 PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL; 279 PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL; 280 PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL; 281 PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL; 282 PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL; 283 PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL; 284 PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL; 285 PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL; 286 PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL; 287 PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL; 288 PFNGLGETSTRINGPROC glad_glGetString = NULL; 289 PFNGLGETSTRINGIPROC glad_glGetStringi = NULL; 290 PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL; 291 PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL; 292 PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL; 293 PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL; 294 PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL; 295 PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL; 296 PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL; 297 PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL; 298 PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL; 299 PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL; 300 PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL; 301 PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL; 302 PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL; 303 PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL; 304 PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL; 305 PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL; 306 PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL; 307 PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL; 308 PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL; 309 PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL; 310 PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL; 311 PFNGLHINTPROC glad_glHint = NULL; 312 PFNGLISBUFFERPROC glad_glIsBuffer = NULL; 313 PFNGLISENABLEDPROC glad_glIsEnabled = NULL; 314 PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL; 315 PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL; 316 PFNGLISPROGRAMPROC glad_glIsProgram = NULL; 317 PFNGLISQUERYPROC glad_glIsQuery = NULL; 318 PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL; 319 PFNGLISSAMPLERPROC glad_glIsSampler = NULL; 320 PFNGLISSHADERPROC glad_glIsShader = NULL; 321 PFNGLISSYNCPROC glad_glIsSync = NULL; 322 PFNGLISTEXTUREPROC glad_glIsTexture = NULL; 323 PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL; 324 PFNGLLINEWIDTHPROC glad_glLineWidth = NULL; 325 PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL; 326 PFNGLLOGICOPPROC glad_glLogicOp = NULL; 327 PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL; 328 PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL; 329 PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL; 330 PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL; 331 PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL; 332 PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL; 333 PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL; 334 PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL; 335 PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL; 336 PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL; 337 PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL; 338 PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL; 339 PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL; 340 PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL; 341 PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL; 342 PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL; 343 PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL; 344 PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL; 345 PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL; 346 PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL; 347 PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL; 348 PFNGLPOINTSIZEPROC glad_glPointSize = NULL; 349 PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL; 350 PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL; 351 PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL; 352 PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL; 353 PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL; 354 PFNGLREADBUFFERPROC glad_glReadBuffer = NULL; 355 PFNGLREADPIXELSPROC glad_glReadPixels = NULL; 356 PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL; 357 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL; 358 PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL; 359 PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL; 360 PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL; 361 PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL; 362 PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL; 363 PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL; 364 PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL; 365 PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL; 366 PFNGLSCISSORPROC glad_glScissor = NULL; 367 PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL; 368 PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL; 369 PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL; 370 PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL; 371 PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL; 372 PFNGLSTENCILMASKPROC glad_glStencilMask = NULL; 373 PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL; 374 PFNGLSTENCILOPPROC glad_glStencilOp = NULL; 375 PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL; 376 PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL; 377 PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL; 378 PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL; 379 PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL; 380 PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL; 381 PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL; 382 PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL; 383 PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL; 384 PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL; 385 PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL; 386 PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL; 387 PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL; 388 PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL; 389 PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL; 390 PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL; 391 PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL; 392 PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL; 393 PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL; 394 PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL; 395 PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL; 396 PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL; 397 PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL; 398 PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL; 399 PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL; 400 PFNGLUNIFORM1FPROC glad_glUniform1f = NULL; 401 PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL; 402 PFNGLUNIFORM1IPROC glad_glUniform1i = NULL; 403 PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL; 404 PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL; 405 PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL; 406 PFNGLUNIFORM2FPROC glad_glUniform2f = NULL; 407 PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL; 408 PFNGLUNIFORM2IPROC glad_glUniform2i = NULL; 409 PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL; 410 PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL; 411 PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL; 412 PFNGLUNIFORM3FPROC glad_glUniform3f = NULL; 413 PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL; 414 PFNGLUNIFORM3IPROC glad_glUniform3i = NULL; 415 PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL; 416 PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL; 417 PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL; 418 PFNGLUNIFORM4FPROC glad_glUniform4f = NULL; 419 PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL; 420 PFNGLUNIFORM4IPROC glad_glUniform4i = NULL; 421 PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL; 422 PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL; 423 PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL; 424 PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL; 425 PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL; 426 PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL; 427 PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL; 428 PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL; 429 PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL; 430 PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL; 431 PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL; 432 PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL; 433 PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL; 434 PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL; 435 PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL; 436 PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL; 437 PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL; 438 PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL; 439 PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL; 440 PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL; 441 PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL; 442 PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL; 443 PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL; 444 PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL; 445 PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL; 446 PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL; 447 PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL; 448 PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL; 449 PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL; 450 PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL; 451 PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL; 452 PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL; 453 PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL; 454 PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL; 455 PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL; 456 PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL; 457 PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL; 458 PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL; 459 PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL; 460 PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL; 461 PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL; 462 PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL; 463 PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL; 464 PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL; 465 PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL; 466 PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL; 467 PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL; 468 PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL; 469 PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL; 470 PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL; 471 PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL; 472 PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL; 473 PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL; 474 PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL; 475 PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL; 476 PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL; 477 PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL; 478 PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL; 479 PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL; 480 PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL; 481 PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL; 482 PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL; 483 PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL; 484 PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL; 485 PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL; 486 PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL; 487 PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL; 488 PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL; 489 PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL; 490 PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL; 491 PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL; 492 PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL; 493 PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL; 494 PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL; 495 PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL; 496 PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL; 497 PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL; 498 PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL; 499 PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL; 500 PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL; 501 PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL; 502 PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL; 503 PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL; 504 PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL; 505 PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL; 506 PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL; 507 PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL; 508 PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL; 509 PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL; 510 PFNGLVIEWPORTPROC glad_glViewport = NULL; 511 PFNGLWAITSYNCPROC glad_glWaitSync = NULL; 512 int GLAD_GL_KHR_debug = 0; 513 PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL; 514 PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL; 515 PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL; 516 PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL; 517 PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL; 518 PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL; 519 PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL; 520 PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL; 521 PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL; 522 PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL; 523 PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL; 524 PFNGLDEBUGMESSAGECONTROLKHRPROC glad_glDebugMessageControlKHR = NULL; 525 PFNGLDEBUGMESSAGEINSERTKHRPROC glad_glDebugMessageInsertKHR = NULL; 526 PFNGLDEBUGMESSAGECALLBACKKHRPROC glad_glDebugMessageCallbackKHR = NULL; 527 PFNGLGETDEBUGMESSAGELOGKHRPROC glad_glGetDebugMessageLogKHR = NULL; 528 PFNGLPUSHDEBUGGROUPKHRPROC glad_glPushDebugGroupKHR = NULL; 529 PFNGLPOPDEBUGGROUPKHRPROC glad_glPopDebugGroupKHR = NULL; 530 PFNGLOBJECTLABELKHRPROC glad_glObjectLabelKHR = NULL; 531 PFNGLGETOBJECTLABELKHRPROC glad_glGetObjectLabelKHR = NULL; 532 PFNGLOBJECTPTRLABELKHRPROC glad_glObjectPtrLabelKHR = NULL; 533 PFNGLGETOBJECTPTRLABELKHRPROC glad_glGetObjectPtrLabelKHR = NULL; 534 PFNGLGETPOINTERVKHRPROC glad_glGetPointervKHR = NULL; 535 static void load_GL_VERSION_1_0(GLADloadproc load) { 536 if(!GLAD_GL_VERSION_1_0) return; 537 glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); 538 glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace"); 539 glad_glHint = (PFNGLHINTPROC)load("glHint"); 540 glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth"); 541 glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize"); 542 glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode"); 543 glad_glScissor = (PFNGLSCISSORPROC)load("glScissor"); 544 glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf"); 545 glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv"); 546 glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri"); 547 glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv"); 548 glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D"); 549 glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D"); 550 glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer"); 551 glad_glClear = (PFNGLCLEARPROC)load("glClear"); 552 glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor"); 553 glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil"); 554 glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth"); 555 glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask"); 556 glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask"); 557 glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask"); 558 glad_glDisable = (PFNGLDISABLEPROC)load("glDisable"); 559 glad_glEnable = (PFNGLENABLEPROC)load("glEnable"); 560 glad_glFinish = (PFNGLFINISHPROC)load("glFinish"); 561 glad_glFlush = (PFNGLFLUSHPROC)load("glFlush"); 562 glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc"); 563 glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp"); 564 glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc"); 565 glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp"); 566 glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc"); 567 glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref"); 568 glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei"); 569 glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer"); 570 glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels"); 571 glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv"); 572 glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev"); 573 glad_glGetError = (PFNGLGETERRORPROC)load("glGetError"); 574 glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv"); 575 glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv"); 576 glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); 577 glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage"); 578 glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv"); 579 glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv"); 580 glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv"); 581 glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv"); 582 glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled"); 583 glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange"); 584 glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport"); 585 } 586 static void load_GL_VERSION_1_1(GLADloadproc load) { 587 if(!GLAD_GL_VERSION_1_1) return; 588 glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays"); 589 glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements"); 590 glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset"); 591 glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D"); 592 glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D"); 593 glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D"); 594 glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D"); 595 glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D"); 596 glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D"); 597 glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture"); 598 glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures"); 599 glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures"); 600 glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture"); 601 } 602 static void load_GL_VERSION_1_2(GLADloadproc load) { 603 if(!GLAD_GL_VERSION_1_2) return; 604 glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements"); 605 glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D"); 606 glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D"); 607 glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D"); 608 } 609 static void load_GL_VERSION_1_3(GLADloadproc load) { 610 if(!GLAD_GL_VERSION_1_3) return; 611 glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture"); 612 glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage"); 613 glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D"); 614 glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D"); 615 glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D"); 616 glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D"); 617 glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D"); 618 glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D"); 619 glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage"); 620 } 621 static void load_GL_VERSION_1_4(GLADloadproc load) { 622 if(!GLAD_GL_VERSION_1_4) return; 623 glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate"); 624 glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays"); 625 glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements"); 626 glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf"); 627 glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv"); 628 glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri"); 629 glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv"); 630 glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor"); 631 glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation"); 632 } 633 static void load_GL_VERSION_1_5(GLADloadproc load) { 634 if(!GLAD_GL_VERSION_1_5) return; 635 glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries"); 636 glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries"); 637 glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery"); 638 glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery"); 639 glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery"); 640 glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv"); 641 glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv"); 642 glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv"); 643 glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer"); 644 glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers"); 645 glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers"); 646 glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer"); 647 glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData"); 648 glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData"); 649 glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData"); 650 glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer"); 651 glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer"); 652 glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv"); 653 glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv"); 654 } 655 static void load_GL_VERSION_2_0(GLADloadproc load) { 656 if(!GLAD_GL_VERSION_2_0) return; 657 glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate"); 658 glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers"); 659 glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate"); 660 glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate"); 661 glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate"); 662 glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader"); 663 glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation"); 664 glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader"); 665 glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram"); 666 glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader"); 667 glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram"); 668 glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader"); 669 glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader"); 670 glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray"); 671 glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray"); 672 glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib"); 673 glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform"); 674 glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders"); 675 glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation"); 676 glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv"); 677 glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog"); 678 glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv"); 679 glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog"); 680 glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource"); 681 glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation"); 682 glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv"); 683 glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv"); 684 glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv"); 685 glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv"); 686 glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv"); 687 glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv"); 688 glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram"); 689 glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader"); 690 glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram"); 691 glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource"); 692 glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram"); 693 glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f"); 694 glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f"); 695 glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f"); 696 glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f"); 697 glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i"); 698 glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i"); 699 glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i"); 700 glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i"); 701 glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv"); 702 glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv"); 703 glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv"); 704 glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv"); 705 glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv"); 706 glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv"); 707 glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv"); 708 glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv"); 709 glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv"); 710 glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv"); 711 glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv"); 712 glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram"); 713 glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d"); 714 glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv"); 715 glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f"); 716 glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv"); 717 glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s"); 718 glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv"); 719 glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d"); 720 glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv"); 721 glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f"); 722 glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv"); 723 glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s"); 724 glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv"); 725 glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d"); 726 glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv"); 727 glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f"); 728 glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv"); 729 glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s"); 730 glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv"); 731 glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv"); 732 glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv"); 733 glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv"); 734 glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub"); 735 glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv"); 736 glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv"); 737 glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv"); 738 glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv"); 739 glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d"); 740 glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv"); 741 glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f"); 742 glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv"); 743 glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv"); 744 glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s"); 745 glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv"); 746 glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv"); 747 glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv"); 748 glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv"); 749 glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer"); 750 } 751 static void load_GL_VERSION_2_1(GLADloadproc load) { 752 if(!GLAD_GL_VERSION_2_1) return; 753 glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv"); 754 glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv"); 755 glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv"); 756 glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv"); 757 glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv"); 758 glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv"); 759 } 760 static void load_GL_VERSION_3_0(GLADloadproc load) { 761 if(!GLAD_GL_VERSION_3_0) return; 762 glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski"); 763 glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v"); 764 glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); 765 glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei"); 766 glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei"); 767 glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi"); 768 glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback"); 769 glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback"); 770 glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); 771 glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); 772 glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings"); 773 glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying"); 774 glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor"); 775 glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender"); 776 glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender"); 777 glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer"); 778 glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv"); 779 glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv"); 780 glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i"); 781 glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i"); 782 glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i"); 783 glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i"); 784 glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui"); 785 glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui"); 786 glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui"); 787 glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui"); 788 glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv"); 789 glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv"); 790 glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv"); 791 glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv"); 792 glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv"); 793 glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv"); 794 glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv"); 795 glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv"); 796 glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv"); 797 glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv"); 798 glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv"); 799 glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv"); 800 glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv"); 801 glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation"); 802 glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation"); 803 glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui"); 804 glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui"); 805 glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui"); 806 glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui"); 807 glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv"); 808 glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv"); 809 glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv"); 810 glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv"); 811 glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv"); 812 glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv"); 813 glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv"); 814 glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv"); 815 glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv"); 816 glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv"); 817 glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv"); 818 glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi"); 819 glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi"); 820 glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer"); 821 glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer"); 822 glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers"); 823 glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers"); 824 glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage"); 825 glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv"); 826 glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer"); 827 glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer"); 828 glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers"); 829 glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers"); 830 glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus"); 831 glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D"); 832 glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D"); 833 glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D"); 834 glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer"); 835 glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv"); 836 glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap"); 837 glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer"); 838 glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample"); 839 glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer"); 840 glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange"); 841 glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange"); 842 glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray"); 843 glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays"); 844 glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays"); 845 glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray"); 846 } 847 static void load_GL_VERSION_3_1(GLADloadproc load) { 848 if(!GLAD_GL_VERSION_3_1) return; 849 glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced"); 850 glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced"); 851 glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer"); 852 glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex"); 853 glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData"); 854 glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices"); 855 glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv"); 856 glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName"); 857 glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex"); 858 glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv"); 859 glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName"); 860 glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding"); 861 glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); 862 glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); 863 glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); 864 } 865 static void load_GL_VERSION_3_2(GLADloadproc load) { 866 if(!GLAD_GL_VERSION_3_2) return; 867 glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex"); 868 glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex"); 869 glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex"); 870 glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex"); 871 glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex"); 872 glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync"); 873 glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync"); 874 glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync"); 875 glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync"); 876 glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync"); 877 glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v"); 878 glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv"); 879 glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v"); 880 glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v"); 881 glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture"); 882 glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample"); 883 glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample"); 884 glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv"); 885 glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski"); 886 } 887 static void load_GL_VERSION_3_3(GLADloadproc load) { 888 if(!GLAD_GL_VERSION_3_3) return; 889 glad_glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)load("glBindFragDataLocationIndexed"); 890 glad_glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)load("glGetFragDataIndex"); 891 glad_glGenSamplers = (PFNGLGENSAMPLERSPROC)load("glGenSamplers"); 892 glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)load("glDeleteSamplers"); 893 glad_glIsSampler = (PFNGLISSAMPLERPROC)load("glIsSampler"); 894 glad_glBindSampler = (PFNGLBINDSAMPLERPROC)load("glBindSampler"); 895 glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)load("glSamplerParameteri"); 896 glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)load("glSamplerParameteriv"); 897 glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)load("glSamplerParameterf"); 898 glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)load("glSamplerParameterfv"); 899 glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)load("glSamplerParameterIiv"); 900 glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)load("glSamplerParameterIuiv"); 901 glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)load("glGetSamplerParameteriv"); 902 glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)load("glGetSamplerParameterIiv"); 903 glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)load("glGetSamplerParameterfv"); 904 glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)load("glGetSamplerParameterIuiv"); 905 glad_glQueryCounter = (PFNGLQUERYCOUNTERPROC)load("glQueryCounter"); 906 glad_glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)load("glGetQueryObjecti64v"); 907 glad_glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)load("glGetQueryObjectui64v"); 908 glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)load("glVertexAttribDivisor"); 909 glad_glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)load("glVertexAttribP1ui"); 910 glad_glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)load("glVertexAttribP1uiv"); 911 glad_glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)load("glVertexAttribP2ui"); 912 glad_glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)load("glVertexAttribP2uiv"); 913 glad_glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)load("glVertexAttribP3ui"); 914 glad_glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)load("glVertexAttribP3uiv"); 915 glad_glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)load("glVertexAttribP4ui"); 916 glad_glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)load("glVertexAttribP4uiv"); 917 glad_glVertexP2ui = (PFNGLVERTEXP2UIPROC)load("glVertexP2ui"); 918 glad_glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)load("glVertexP2uiv"); 919 glad_glVertexP3ui = (PFNGLVERTEXP3UIPROC)load("glVertexP3ui"); 920 glad_glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)load("glVertexP3uiv"); 921 glad_glVertexP4ui = (PFNGLVERTEXP4UIPROC)load("glVertexP4ui"); 922 glad_glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)load("glVertexP4uiv"); 923 glad_glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)load("glTexCoordP1ui"); 924 glad_glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)load("glTexCoordP1uiv"); 925 glad_glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)load("glTexCoordP2ui"); 926 glad_glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)load("glTexCoordP2uiv"); 927 glad_glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)load("glTexCoordP3ui"); 928 glad_glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)load("glTexCoordP3uiv"); 929 glad_glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)load("glTexCoordP4ui"); 930 glad_glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)load("glTexCoordP4uiv"); 931 glad_glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)load("glMultiTexCoordP1ui"); 932 glad_glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)load("glMultiTexCoordP1uiv"); 933 glad_glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)load("glMultiTexCoordP2ui"); 934 glad_glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)load("glMultiTexCoordP2uiv"); 935 glad_glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)load("glMultiTexCoordP3ui"); 936 glad_glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)load("glMultiTexCoordP3uiv"); 937 glad_glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)load("glMultiTexCoordP4ui"); 938 glad_glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)load("glMultiTexCoordP4uiv"); 939 glad_glNormalP3ui = (PFNGLNORMALP3UIPROC)load("glNormalP3ui"); 940 glad_glNormalP3uiv = (PFNGLNORMALP3UIVPROC)load("glNormalP3uiv"); 941 glad_glColorP3ui = (PFNGLCOLORP3UIPROC)load("glColorP3ui"); 942 glad_glColorP3uiv = (PFNGLCOLORP3UIVPROC)load("glColorP3uiv"); 943 glad_glColorP4ui = (PFNGLCOLORP4UIPROC)load("glColorP4ui"); 944 glad_glColorP4uiv = (PFNGLCOLORP4UIVPROC)load("glColorP4uiv"); 945 glad_glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)load("glSecondaryColorP3ui"); 946 glad_glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)load("glSecondaryColorP3uiv"); 947 } 948 static void load_GL_KHR_debug(GLADloadproc load) { 949 if(!GLAD_GL_KHR_debug) return; 950 glad_glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)load("glDebugMessageControl"); 951 glad_glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)load("glDebugMessageInsert"); 952 glad_glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)load("glDebugMessageCallback"); 953 glad_glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)load("glGetDebugMessageLog"); 954 glad_glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)load("glPushDebugGroup"); 955 glad_glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)load("glPopDebugGroup"); 956 glad_glObjectLabel = (PFNGLOBJECTLABELPROC)load("glObjectLabel"); 957 glad_glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)load("glGetObjectLabel"); 958 glad_glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)load("glObjectPtrLabel"); 959 glad_glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)load("glGetObjectPtrLabel"); 960 glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv"); 961 glad_glDebugMessageControlKHR = (PFNGLDEBUGMESSAGECONTROLKHRPROC)load("glDebugMessageControlKHR"); 962 glad_glDebugMessageInsertKHR = (PFNGLDEBUGMESSAGEINSERTKHRPROC)load("glDebugMessageInsertKHR"); 963 glad_glDebugMessageCallbackKHR = (PFNGLDEBUGMESSAGECALLBACKKHRPROC)load("glDebugMessageCallbackKHR"); 964 glad_glGetDebugMessageLogKHR = (PFNGLGETDEBUGMESSAGELOGKHRPROC)load("glGetDebugMessageLogKHR"); 965 glad_glPushDebugGroupKHR = (PFNGLPUSHDEBUGGROUPKHRPROC)load("glPushDebugGroupKHR"); 966 glad_glPopDebugGroupKHR = (PFNGLPOPDEBUGGROUPKHRPROC)load("glPopDebugGroupKHR"); 967 glad_glObjectLabelKHR = (PFNGLOBJECTLABELKHRPROC)load("glObjectLabelKHR"); 968 glad_glGetObjectLabelKHR = (PFNGLGETOBJECTLABELKHRPROC)load("glGetObjectLabelKHR"); 969 glad_glObjectPtrLabelKHR = (PFNGLOBJECTPTRLABELKHRPROC)load("glObjectPtrLabelKHR"); 970 glad_glGetObjectPtrLabelKHR = (PFNGLGETOBJECTPTRLABELKHRPROC)load("glGetObjectPtrLabelKHR"); 971 glad_glGetPointervKHR = (PFNGLGETPOINTERVKHRPROC)load("glGetPointervKHR"); 972 } 973 static int find_extensionsGL(void) { 974 if (!get_exts()) return 0; 975 GLAD_GL_KHR_debug = has_ext("GL_KHR_debug"); 976 free_exts(); 977 return 1; 978 } 979 980 static void find_coreGL(void) { 981 982 /* Thank you @elmindreda 983 * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 984 * https://github.com/glfw/glfw/blob/master/src/context.c#L36 985 */ 986 int i, major, minor; 987 988 const char* version; 989 const char* prefixes[] = { 990 "OpenGL ES-CM ", 991 "OpenGL ES-CL ", 992 "OpenGL ES ", 993 NULL 994 }; 995 996 version = (const char*) glGetString(GL_VERSION); 997 if (!version) return; 998 999 for (i = 0; prefixes[i]; i++) { 1000 const size_t length = strlen(prefixes[i]); 1001 if (strncmp(version, prefixes[i], length) == 0) { 1002 version += length; 1003 break; 1004 } 1005 } 1006 1007 /* PR #18 */ 1008 #ifdef _MSC_VER 1009 sscanf_s(version, "%d.%d", &major, &minor); 1010 #else 1011 sscanf(version, "%d.%d", &major, &minor); 1012 #endif 1013 1014 GLVersion.major = major; GLVersion.minor = minor; 1015 max_loaded_major = major; max_loaded_minor = minor; 1016 GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; 1017 GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; 1018 GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; 1019 GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; 1020 GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; 1021 GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; 1022 GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; 1023 GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; 1024 GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; 1025 GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; 1026 GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; 1027 GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; 1028 if (GLVersion.major > 3 || (GLVersion.major >= 3 && GLVersion.minor >= 3)) { 1029 max_loaded_major = 3; 1030 max_loaded_minor = 3; 1031 } 1032 } 1033 1034 int gladLoadGLLoader(GLADloadproc load) { 1035 GLVersion.major = 0; GLVersion.minor = 0; 1036 glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); 1037 if(glGetString == NULL) return 0; 1038 if(glGetString(GL_VERSION) == NULL) return 0; 1039 find_coreGL(); 1040 load_GL_VERSION_1_0(load); 1041 load_GL_VERSION_1_1(load); 1042 load_GL_VERSION_1_2(load); 1043 load_GL_VERSION_1_3(load); 1044 load_GL_VERSION_1_4(load); 1045 load_GL_VERSION_1_5(load); 1046 load_GL_VERSION_2_0(load); 1047 load_GL_VERSION_2_1(load); 1048 load_GL_VERSION_3_0(load); 1049 load_GL_VERSION_3_1(load); 1050 load_GL_VERSION_3_2(load); 1051 load_GL_VERSION_3_3(load); 1052 1053 if (!find_extensionsGL()) return 0; 1054 load_GL_KHR_debug(load); 1055 return GLVersion.major != 0 || GLVersion.minor != 0; 1056 } 1057