opengl-triangle

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