Subversion Repositories eduke32

Rev

Rev 6948 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6656 pogokeen 1
/*
2
 
7752 pogokeen 3
    OpenGL, OpenGL ES loader generated by glad 0.1.30 on Thu Jul  4 02:00:01 2019.
6656 pogokeen 4
 
5
    Language/Generator: C/C++
6
    Specification: gl
7
    APIs: gl=2.0, gles2=2.0, gles1=1.0
8
    Profile: compatibility
9
    Extensions:
10
        GL_ARB_buffer_storage,
7752 pogokeen 11
        GL_ARB_clip_control,
6656 pogokeen 12
        GL_ARB_debug_output,
7752 pogokeen 13
        GL_ARB_depth_clamp,
6656 pogokeen 14
        GL_ARB_map_buffer_range,
7752 pogokeen 15
        GL_ARB_shader_texture_lod,
6661 pogokeen 16
        GL_ARB_sync,
6656 pogokeen 17
        GL_ARB_texture_rectangle,
18
        GL_EXT_fog_coord,
19
        GL_EXT_framebuffer_object,
20
        GL_EXT_texture_compression_s3tc,
21
        GL_EXT_texture_filter_anisotropic,
22
        GL_NV_fog_distance,
23
        GL_NV_multisample_filter_hint,
24
        GL_SGIS_fog_function,
25
        GL_SGIX_fog_offset
26
    Loader: True
27
    Local files: False
28
    Omit khrplatform: False
7752 pogokeen 29
    Reproducible: False
6656 pogokeen 30
 
31
    Commandline:
7752 pogokeen 32
        --profile="compatibility" --api="gl=2.0,gles2=2.0,gles1=1.0" --generator="c" --spec="gl" --extensions="GL_ARB_buffer_storage,GL_ARB_clip_control,GL_ARB_debug_output,GL_ARB_depth_clamp,GL_ARB_map_buffer_range,GL_ARB_shader_texture_lod,GL_ARB_sync,GL_ARB_texture_rectangle,GL_EXT_fog_coord,GL_EXT_framebuffer_object,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_NV_fog_distance,GL_NV_multisample_filter_hint,GL_SGIS_fog_function,GL_SGIX_fog_offset"
6656 pogokeen 33
    Online:
7752 pogokeen 34
        https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D2.0&api=gles2%3D2.0&api=gles1%3D1.0&extensions=GL_ARB_buffer_storage&extensions=GL_ARB_clip_control&extensions=GL_ARB_debug_output&extensions=GL_ARB_depth_clamp&extensions=GL_ARB_map_buffer_range&extensions=GL_ARB_shader_texture_lod&extensions=GL_ARB_sync&extensions=GL_ARB_texture_rectangle&extensions=GL_EXT_fog_coord&extensions=GL_EXT_framebuffer_object&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_NV_fog_distance&extensions=GL_NV_multisample_filter_hint&extensions=GL_SGIS_fog_function&extensions=GL_SGIX_fog_offset
6656 pogokeen 35
*/
36
 
37
#include <stdio.h>
38
#include <stdlib.h>
39
#include <string.h>
40
#include <glad/glad.h>
41
 
42
static void* get_proc(const char *namez);
43
 
6948 hendricks2 44
#if defined(_WIN32) || defined(__CYGWIN__)
6656 pogokeen 45
#include <windows.h>
46
static HMODULE libGL;
47
 
48
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
49
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
50
 
6948 hendricks2 51
#ifdef _MSC_VER
52
#ifdef __has_include
53
  #if __has_include(<winapifamily.h>)
54
    #define HAVE_WINAPIFAMILY 1
55
  #endif
56
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
57
  #define HAVE_WINAPIFAMILY 1
58
#endif
59
#endif
60
 
61
#ifdef HAVE_WINAPIFAMILY
62
  #include <winapifamily.h>
63
  #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
64
    #define IS_UWP 1
65
  #endif
66
#endif
67
 
6656 pogokeen 68
static
69
int open_gl(void) {
6948 hendricks2 70
#ifndef IS_UWP
6656 pogokeen 71
    libGL = LoadLibraryW(L"opengl32.dll");
72
    if(libGL != NULL) {
6948 hendricks2 73
        void (* tmp)(void);
74
        tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
75
        gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
6656 pogokeen 76
        return gladGetProcAddressPtr != NULL;
77
    }
6948 hendricks2 78
#endif
6656 pogokeen 79
 
80
    return 0;
81
}
82
 
83
static
84
void close_gl(void) {
85
    if(libGL != NULL) {
6780 hendricks2 86
        FreeLibrary((HMODULE) libGL);
6948 hendricks2 87
        libGL = NULL;
6656 pogokeen 88
    }
89
}
90
#else
91
#include <dlfcn.h>
92
static void* libGL;
93
 
7752 pogokeen 94
#if !defined(__APPLE__) && !defined(__HAIKU__)
6656 pogokeen 95
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
96
static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
97
#endif
98
 
99
static
100
int open_gl(void) {
101
#ifdef __APPLE__
102
    static const char *NAMES[] = {
103
        "../Frameworks/OpenGL.framework/OpenGL",
104
        "/Library/Frameworks/OpenGL.framework/OpenGL",
105
        "/System/Library/Frameworks/OpenGL.framework/OpenGL",
106
        "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
107
    };
108
#else
109
    static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
110
#endif
111
 
112
    unsigned int index = 0;
113
    for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
114
        libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
115
 
116
        if(libGL != NULL) {
7752 pogokeen 117
#if defined(__APPLE__) || defined(__HAIKU__)
6656 pogokeen 118
            return 1;
119
#else
120
            gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
121
                "glXGetProcAddressARB");
122
            return gladGetProcAddressPtr != NULL;
123
#endif
124
        }
125
    }
126
 
127
    return 0;
128
}
129
 
130
static
131
void close_gl(void) {
132
    if(libGL != NULL) {
133
        dlclose(libGL);
134
        libGL = NULL;
135
    }
136
}
137
#endif
138
 
139
static
140
void* get_proc(const char *namez) {
141
    void* result = NULL;
142
    if(libGL == NULL) return NULL;
143
 
7752 pogokeen 144
#if !defined(__APPLE__) && !defined(__HAIKU__)
6656 pogokeen 145
    if(gladGetProcAddressPtr != NULL) {
146
        result = gladGetProcAddressPtr(namez);
147
    }
148
#endif
149
    if(result == NULL) {
6948 hendricks2 150
#if defined(_WIN32) || defined(__CYGWIN__)
6780 hendricks2 151
        result = (void*)GetProcAddress((HMODULE) libGL, namez);
6656 pogokeen 152
#else
153
        result = dlsym(libGL, namez);
154
#endif
155
    }
156
 
157
    return result;
158
}
159
 
160
int gladLoadGL(void) {
161
    int status = 0;
162
 
163
    if(open_gl()) {
164
        status = gladLoadGLLoader(&get_proc);
165
        close_gl();
166
    }
167
 
168
    return status;
169
}
170
 
7752 pogokeen 171
struct gladGLversionStruct GLVersion = { 0, 0 };
6656 pogokeen 172
 
173
#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
174
#define _GLAD_IS_SOME_NEW_VERSION 1
175
#endif
176
 
177
static int max_loaded_major;
178
static int max_loaded_minor;
179
 
180
static const char *exts = NULL;
181
static int num_exts_i = 0;
6948 hendricks2 182
static char **exts_i = NULL;
6656 pogokeen 183
 
184
static int get_exts(void) {
185
#ifdef _GLAD_IS_SOME_NEW_VERSION
186
    if(max_loaded_major < 3) {
187
#endif
188
        exts = (const char *)glGetString(GL_EXTENSIONS);
189
#ifdef _GLAD_IS_SOME_NEW_VERSION
190
    } else {
191
        unsigned int index;
192
 
193
        num_exts_i = 0;
194
        glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
195
        if (num_exts_i > 0) {
7752 pogokeen 196
            exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i));
6656 pogokeen 197
        }
198
 
199
        if (exts_i == NULL) {
200
            return 0;
201
        }
202
 
203
        for(index = 0; index < (unsigned)num_exts_i; index++) {
204
            const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index);
205
            size_t len = strlen(gl_str_tmp);
206
 
6780 hendricks2 207
            char *local_str = (char*)malloc((len+1) * sizeof(char));
6656 pogokeen 208
            if(local_str != NULL) {
6948 hendricks2 209
                memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char));
6656 pogokeen 210
            }
211
            exts_i[index] = local_str;
212
        }
213
    }
214
#endif
215
    return 1;
216
}
217
 
218
static void free_exts(void) {
219
    if (exts_i != NULL) {
220
        int index;
221
        for(index = 0; index < num_exts_i; index++) {
222
            free((char *)exts_i[index]);
223
        }
224
        free((void *)exts_i);
225
        exts_i = NULL;
226
    }
227
}
228
 
229
static int has_ext(const char *ext) {
230
#ifdef _GLAD_IS_SOME_NEW_VERSION
231
    if(max_loaded_major < 3) {
232
#endif
233
        const char *extensions;
234
        const char *loc;
235
        const char *terminator;
236
        extensions = exts;
237
        if(extensions == NULL || ext == NULL) {
238
            return 0;
239
        }
240
 
241
        while(1) {
242
            loc = strstr(extensions, ext);
243
            if(loc == NULL) {
244
                return 0;
245
            }
246
 
247
            terminator = loc + strlen(ext);
248
            if((loc == extensions || *(loc - 1) == ' ') &&
249
                (*terminator == ' ' || *terminator == '\0')) {
250
                return 1;
251
            }
252
            extensions = terminator;
253
        }
254
#ifdef _GLAD_IS_SOME_NEW_VERSION
255
    } else {
256
        int index;
257
        if(exts_i == NULL) return 0;
258
        for(index = 0; index < num_exts_i; index++) {
259
            const char *e = exts_i[index];
260
 
261
            if(exts_i[index] != NULL && strcmp(e, ext) == 0) {
262
                return 1;
263
            }
264
        }
265
    }
266
#endif
267
 
268
    return 0;
269
}
7752 pogokeen 270
int GLAD_GL_VERSION_1_0 = 0;
271
int GLAD_GL_VERSION_1_1 = 0;
272
int GLAD_GL_VERSION_1_2 = 0;
273
int GLAD_GL_VERSION_1_3 = 0;
274
int GLAD_GL_VERSION_1_4 = 0;
275
int GLAD_GL_VERSION_1_5 = 0;
276
int GLAD_GL_VERSION_2_0 = 0;
277
int GLAD_GL_ES_VERSION_2_0 = 0;
278
int GLAD_GL_VERSION_ES_CM_1_0 = 0;
279
PFNGLACCUMPROC glad_glAccum = NULL;
280
PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL;
281
PFNGLALPHAFUNCPROC glad_glAlphaFunc = NULL;
282
PFNGLALPHAFUNCXPROC glad_glAlphaFuncx = NULL;
283
PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident = NULL;
284
PFNGLARRAYELEMENTPROC glad_glArrayElement = NULL;
285
PFNGLATTACHSHADERPROC glad_glAttachShader = NULL;
286
PFNGLBEGINPROC glad_glBegin = NULL;
287
PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL;
288
PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL;
289
PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL;
290
PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL;
291
PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;
292
PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL;
293
PFNGLBITMAPPROC glad_glBitmap = NULL;
294
PFNGLBLENDCOLORPROC glad_glBlendColor = NULL;
295
PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL;
296
PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL;
297
PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL;
298
PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL;
299
PFNGLBUFFERDATAPROC glad_glBufferData = NULL;
300
PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL;
301
PFNGLCALLLISTPROC glad_glCallList = NULL;
302
PFNGLCALLLISTSPROC glad_glCallLists = NULL;
303
PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL;
304
PFNGLCLEARPROC glad_glClear = NULL;
305
PFNGLCLEARACCUMPROC glad_glClearAccum = NULL;
306
PFNGLCLEARCOLORPROC glad_glClearColor = NULL;
307
PFNGLCLEARCOLORXPROC glad_glClearColorx = NULL;
308
PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL;
309
PFNGLCLEARDEPTHFPROC glad_glClearDepthf = NULL;
310
PFNGLCLEARDEPTHXPROC glad_glClearDepthx = NULL;
311
PFNGLCLEARINDEXPROC glad_glClearIndex = NULL;
312
PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL;
313
PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture = NULL;
314
PFNGLCLIPPLANEPROC glad_glClipPlane = NULL;
315
PFNGLCLIPPLANEFPROC glad_glClipPlanef = NULL;
316
PFNGLCLIPPLANEXPROC glad_glClipPlanex = NULL;
317
PFNGLCOLOR3BPROC glad_glColor3b = NULL;
318
PFNGLCOLOR3BVPROC glad_glColor3bv = NULL;
319
PFNGLCOLOR3DPROC glad_glColor3d = NULL;
320
PFNGLCOLOR3DVPROC glad_glColor3dv = NULL;
321
PFNGLCOLOR3FPROC glad_glColor3f = NULL;
322
PFNGLCOLOR3FVPROC glad_glColor3fv = NULL;
323
PFNGLCOLOR3IPROC glad_glColor3i = NULL;
324
PFNGLCOLOR3IVPROC glad_glColor3iv = NULL;
325
PFNGLCOLOR3SPROC glad_glColor3s = NULL;
326
PFNGLCOLOR3SVPROC glad_glColor3sv = NULL;
327
PFNGLCOLOR3UBPROC glad_glColor3ub = NULL;
328
PFNGLCOLOR3UBVPROC glad_glColor3ubv = NULL;
329
PFNGLCOLOR3UIPROC glad_glColor3ui = NULL;
330
PFNGLCOLOR3UIVPROC glad_glColor3uiv = NULL;
331
PFNGLCOLOR3USPROC glad_glColor3us = NULL;
332
PFNGLCOLOR3USVPROC glad_glColor3usv = NULL;
333
PFNGLCOLOR4BPROC glad_glColor4b = NULL;
334
PFNGLCOLOR4BVPROC glad_glColor4bv = NULL;
335
PFNGLCOLOR4DPROC glad_glColor4d = NULL;
336
PFNGLCOLOR4DVPROC glad_glColor4dv = NULL;
337
PFNGLCOLOR4FPROC glad_glColor4f = NULL;
338
PFNGLCOLOR4FVPROC glad_glColor4fv = NULL;
339
PFNGLCOLOR4IPROC glad_glColor4i = NULL;
340
PFNGLCOLOR4IVPROC glad_glColor4iv = NULL;
341
PFNGLCOLOR4SPROC glad_glColor4s = NULL;
342
PFNGLCOLOR4SVPROC glad_glColor4sv = NULL;
343
PFNGLCOLOR4UBPROC glad_glColor4ub = NULL;
344
PFNGLCOLOR4UBVPROC glad_glColor4ubv = NULL;
345
PFNGLCOLOR4UIPROC glad_glColor4ui = NULL;
346
PFNGLCOLOR4UIVPROC glad_glColor4uiv = NULL;
347
PFNGLCOLOR4USPROC glad_glColor4us = NULL;
348
PFNGLCOLOR4USVPROC glad_glColor4usv = NULL;
349
PFNGLCOLOR4XPROC glad_glColor4x = NULL;
350
PFNGLCOLORMASKPROC glad_glColorMask = NULL;
351
PFNGLCOLORMATERIALPROC glad_glColorMaterial = NULL;
352
PFNGLCOLORPOINTERPROC glad_glColorPointer = NULL;
353
PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL;
354
PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL;
355
PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL;
356
PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL;
357
PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL;
358
PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL;
359
PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL;
360
PFNGLCOPYPIXELSPROC glad_glCopyPixels = NULL;
361
PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL;
362
PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL;
363
PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL;
364
PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL;
365
PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL;
366
PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL;
367
PFNGLCREATESHADERPROC glad_glCreateShader = NULL;
368
PFNGLCULLFACEPROC glad_glCullFace = NULL;
369
PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL;
370
PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL;
371
PFNGLDELETELISTSPROC glad_glDeleteLists = NULL;
372
PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL;
373
PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL;
374
PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;
375
PFNGLDELETESHADERPROC glad_glDeleteShader = NULL;
376
PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL;
377
PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL;
378
PFNGLDEPTHMASKPROC glad_glDepthMask = NULL;
379
PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL;
380
PFNGLDEPTHRANGEFPROC glad_glDepthRangef = NULL;
381
PFNGLDEPTHRANGEXPROC glad_glDepthRangex = NULL;
382
PFNGLDETACHSHADERPROC glad_glDetachShader = NULL;
383
PFNGLDISABLEPROC glad_glDisable = NULL;
384
PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState = NULL;
385
PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL;
386
PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL;
387
PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL;
388
PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL;
389
PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL;
390
PFNGLDRAWPIXELSPROC glad_glDrawPixels = NULL;
391
PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL;
392
PFNGLEDGEFLAGPROC glad_glEdgeFlag = NULL;
393
PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer = NULL;
394
PFNGLEDGEFLAGVPROC glad_glEdgeFlagv = NULL;
395
PFNGLENABLEPROC glad_glEnable = NULL;
396
PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState = NULL;
397
PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL;
398
PFNGLENDPROC glad_glEnd = NULL;
399
PFNGLENDLISTPROC glad_glEndList = NULL;
400
PFNGLENDQUERYPROC glad_glEndQuery = NULL;
401
PFNGLEVALCOORD1DPROC glad_glEvalCoord1d = NULL;
402
PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv = NULL;
403
PFNGLEVALCOORD1FPROC glad_glEvalCoord1f = NULL;
404
PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv = NULL;
405
PFNGLEVALCOORD2DPROC glad_glEvalCoord2d = NULL;
406
PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv = NULL;
407
PFNGLEVALCOORD2FPROC glad_glEvalCoord2f = NULL;
408
PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv = NULL;
409
PFNGLEVALMESH1PROC glad_glEvalMesh1 = NULL;
410
PFNGLEVALMESH2PROC glad_glEvalMesh2 = NULL;
411
PFNGLEVALPOINT1PROC glad_glEvalPoint1 = NULL;
412
PFNGLEVALPOINT2PROC glad_glEvalPoint2 = NULL;
413
PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer = NULL;
414
PFNGLFINISHPROC glad_glFinish = NULL;
415
PFNGLFLUSHPROC glad_glFlush = NULL;
416
PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer = NULL;
417
PFNGLFOGCOORDDPROC glad_glFogCoordd = NULL;
418
PFNGLFOGCOORDDVPROC glad_glFogCoorddv = NULL;
419
PFNGLFOGCOORDFPROC glad_glFogCoordf = NULL;
420
PFNGLFOGCOORDFVPROC glad_glFogCoordfv = NULL;
421
PFNGLFOGFPROC glad_glFogf = NULL;
422
PFNGLFOGFVPROC glad_glFogfv = NULL;
423
PFNGLFOGIPROC glad_glFogi = NULL;
424
PFNGLFOGIVPROC glad_glFogiv = NULL;
425
PFNGLFOGXPROC glad_glFogx = NULL;
426
PFNGLFOGXVPROC glad_glFogxv = NULL;
427
PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL;
428
PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL;
429
PFNGLFRONTFACEPROC glad_glFrontFace = NULL;
430
PFNGLFRUSTUMPROC glad_glFrustum = NULL;
431
PFNGLFRUSTUMFPROC glad_glFrustumf = NULL;
432
PFNGLFRUSTUMXPROC glad_glFrustumx = NULL;
433
PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL;
434
PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL;
435
PFNGLGENLISTSPROC glad_glGenLists = NULL;
436
PFNGLGENQUERIESPROC glad_glGenQueries = NULL;
437
PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL;
438
PFNGLGENTEXTURESPROC glad_glGenTextures = NULL;
439
PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;
440
PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL;
441
PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL;
442
PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL;
443
PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL;
444
PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL;
445
PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL;
446
PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL;
447
PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL;
448
PFNGLGETCLIPPLANEPROC glad_glGetClipPlane = NULL;
449
PFNGLGETCLIPPLANEFPROC glad_glGetClipPlanef = NULL;
450
PFNGLGETCLIPPLANEXPROC glad_glGetClipPlanex = NULL;
451
PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL;
452
PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL;
453
PFNGLGETERRORPROC glad_glGetError = NULL;
454
PFNGLGETFIXEDVPROC glad_glGetFixedv = NULL;
455
PFNGLGETFLOATVPROC glad_glGetFloatv = NULL;
456
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL;
457
PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL;
458
PFNGLGETLIGHTFVPROC glad_glGetLightfv = NULL;
459
PFNGLGETLIGHTIVPROC glad_glGetLightiv = NULL;
460
PFNGLGETLIGHTXVPROC glad_glGetLightxv = NULL;
461
PFNGLGETMAPDVPROC glad_glGetMapdv = NULL;
462
PFNGLGETMAPFVPROC glad_glGetMapfv = NULL;
463
PFNGLGETMAPIVPROC glad_glGetMapiv = NULL;
464
PFNGLGETMATERIALFVPROC glad_glGetMaterialfv = NULL;
465
PFNGLGETMATERIALIVPROC glad_glGetMaterialiv = NULL;
466
PFNGLGETMATERIALXVPROC glad_glGetMaterialxv = NULL;
467
PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv = NULL;
468
PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv = NULL;
469
PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv = NULL;
470
PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL;
471
PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple = NULL;
472
PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL;
473
PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL;
474
PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL;
475
PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL;
476
PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL;
477
PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL;
478
PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL;
479
PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat = NULL;
480
PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL;
481
PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL;
482
PFNGLGETSTRINGPROC glad_glGetString = NULL;
483
PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv = NULL;
484
PFNGLGETTEXENVIVPROC glad_glGetTexEnviv = NULL;
485
PFNGLGETTEXENVXVPROC glad_glGetTexEnvxv = NULL;
486
PFNGLGETTEXGENDVPROC glad_glGetTexGendv = NULL;
487
PFNGLGETTEXGENFVPROC glad_glGetTexGenfv = NULL;
488
PFNGLGETTEXGENIVPROC glad_glGetTexGeniv = NULL;
489
PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL;
490
PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL;
491
PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL;
492
PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL;
493
PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL;
494
PFNGLGETTEXPARAMETERXVPROC glad_glGetTexParameterxv = NULL;
495
PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL;
496
PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL;
497
PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL;
498
PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL;
499
PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL;
500
PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL;
501
PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL;
502
PFNGLHINTPROC glad_glHint = NULL;
503
PFNGLINDEXMASKPROC glad_glIndexMask = NULL;
504
PFNGLINDEXPOINTERPROC glad_glIndexPointer = NULL;
505
PFNGLINDEXDPROC glad_glIndexd = NULL;
506
PFNGLINDEXDVPROC glad_glIndexdv = NULL;
507
PFNGLINDEXFPROC glad_glIndexf = NULL;
508
PFNGLINDEXFVPROC glad_glIndexfv = NULL;
509
PFNGLINDEXIPROC glad_glIndexi = NULL;
510
PFNGLINDEXIVPROC glad_glIndexiv = NULL;
511
PFNGLINDEXSPROC glad_glIndexs = NULL;
512
PFNGLINDEXSVPROC glad_glIndexsv = NULL;
513
PFNGLINDEXUBPROC glad_glIndexub = NULL;
514
PFNGLINDEXUBVPROC glad_glIndexubv = NULL;
515
PFNGLINITNAMESPROC glad_glInitNames = NULL;
516
PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays = NULL;
517
PFNGLISBUFFERPROC glad_glIsBuffer = NULL;
518
PFNGLISENABLEDPROC glad_glIsEnabled = NULL;
519
PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL;
520
PFNGLISLISTPROC glad_glIsList = NULL;
521
PFNGLISPROGRAMPROC glad_glIsProgram = NULL;
522
PFNGLISQUERYPROC glad_glIsQuery = NULL;
523
PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;
524
PFNGLISSHADERPROC glad_glIsShader = NULL;
525
PFNGLISTEXTUREPROC glad_glIsTexture = NULL;
526
PFNGLLIGHTMODELFPROC glad_glLightModelf = NULL;
527
PFNGLLIGHTMODELFVPROC glad_glLightModelfv = NULL;
528
PFNGLLIGHTMODELIPROC glad_glLightModeli = NULL;
529
PFNGLLIGHTMODELIVPROC glad_glLightModeliv = NULL;
530
PFNGLLIGHTMODELXPROC glad_glLightModelx = NULL;
531
PFNGLLIGHTMODELXVPROC glad_glLightModelxv = NULL;
532
PFNGLLIGHTFPROC glad_glLightf = NULL;
533
PFNGLLIGHTFVPROC glad_glLightfv = NULL;
534
PFNGLLIGHTIPROC glad_glLighti = NULL;
535
PFNGLLIGHTIVPROC glad_glLightiv = NULL;
536
PFNGLLIGHTXPROC glad_glLightx = NULL;
537
PFNGLLIGHTXVPROC glad_glLightxv = NULL;
538
PFNGLLINESTIPPLEPROC glad_glLineStipple = NULL;
539
PFNGLLINEWIDTHPROC glad_glLineWidth = NULL;
540
PFNGLLINEWIDTHXPROC glad_glLineWidthx = NULL;
541
PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL;
542
PFNGLLISTBASEPROC glad_glListBase = NULL;
543
PFNGLLOADIDENTITYPROC glad_glLoadIdentity = NULL;
544
PFNGLLOADMATRIXDPROC glad_glLoadMatrixd = NULL;
545
PFNGLLOADMATRIXFPROC glad_glLoadMatrixf = NULL;
546
PFNGLLOADMATRIXXPROC glad_glLoadMatrixx = NULL;
547
PFNGLLOADNAMEPROC glad_glLoadName = NULL;
548
PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd = NULL;
549
PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf = NULL;
550
PFNGLLOGICOPPROC glad_glLogicOp = NULL;
551
PFNGLMAP1DPROC glad_glMap1d = NULL;
552
PFNGLMAP1FPROC glad_glMap1f = NULL;
553
PFNGLMAP2DPROC glad_glMap2d = NULL;
554
PFNGLMAP2FPROC glad_glMap2f = NULL;
555
PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL;
556
PFNGLMAPGRID1DPROC glad_glMapGrid1d = NULL;
557
PFNGLMAPGRID1FPROC glad_glMapGrid1f = NULL;
558
PFNGLMAPGRID2DPROC glad_glMapGrid2d = NULL;
559
PFNGLMAPGRID2FPROC glad_glMapGrid2f = NULL;
560
PFNGLMATERIALFPROC glad_glMaterialf = NULL;
561
PFNGLMATERIALFVPROC glad_glMaterialfv = NULL;
562
PFNGLMATERIALIPROC glad_glMateriali = NULL;
563
PFNGLMATERIALIVPROC glad_glMaterialiv = NULL;
564
PFNGLMATERIALXPROC glad_glMaterialx = NULL;
565
PFNGLMATERIALXVPROC glad_glMaterialxv = NULL;
566
PFNGLMATRIXMODEPROC glad_glMatrixMode = NULL;
567
PFNGLMULTMATRIXDPROC glad_glMultMatrixd = NULL;
568
PFNGLMULTMATRIXFPROC glad_glMultMatrixf = NULL;
569
PFNGLMULTMATRIXXPROC glad_glMultMatrixx = NULL;
570
PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd = NULL;
571
PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf = NULL;
572
PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL;
573
PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL;
574
PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d = NULL;
575
PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv = NULL;
576
PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f = NULL;
577
PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv = NULL;
578
PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i = NULL;
579
PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv = NULL;
580
PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s = NULL;
581
PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv = NULL;
582
PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d = NULL;
583
PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv = NULL;
584
PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f = NULL;
585
PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv = NULL;
586
PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i = NULL;
587
PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv = NULL;
588
PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s = NULL;
589
PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv = NULL;
590
PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d = NULL;
591
PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv = NULL;
592
PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f = NULL;
593
PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv = NULL;
594
PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i = NULL;
595
PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv = NULL;
596
PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s = NULL;
597
PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv = NULL;
598
PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d = NULL;
599
PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv = NULL;
600
PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f = NULL;
601
PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv = NULL;
602
PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i = NULL;
603
PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv = NULL;
604
PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s = NULL;
605
PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv = NULL;
606
PFNGLMULTITEXCOORD4XPROC glad_glMultiTexCoord4x = NULL;
607
PFNGLNEWLISTPROC glad_glNewList = NULL;
608
PFNGLNORMAL3BPROC glad_glNormal3b = NULL;
609
PFNGLNORMAL3BVPROC glad_glNormal3bv = NULL;
610
PFNGLNORMAL3DPROC glad_glNormal3d = NULL;
611
PFNGLNORMAL3DVPROC glad_glNormal3dv = NULL;
612
PFNGLNORMAL3FPROC glad_glNormal3f = NULL;
613
PFNGLNORMAL3FVPROC glad_glNormal3fv = NULL;
614
PFNGLNORMAL3IPROC glad_glNormal3i = NULL;
615
PFNGLNORMAL3IVPROC glad_glNormal3iv = NULL;
616
PFNGLNORMAL3SPROC glad_glNormal3s = NULL;
617
PFNGLNORMAL3SVPROC glad_glNormal3sv = NULL;
618
PFNGLNORMAL3XPROC glad_glNormal3x = NULL;
619
PFNGLNORMALPOINTERPROC glad_glNormalPointer = NULL;
620
PFNGLORTHOPROC glad_glOrtho = NULL;
621
PFNGLORTHOFPROC glad_glOrthof = NULL;
622
PFNGLORTHOXPROC glad_glOrthox = NULL;
623
PFNGLPASSTHROUGHPROC glad_glPassThrough = NULL;
624
PFNGLPIXELMAPFVPROC glad_glPixelMapfv = NULL;
625
PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv = NULL;
626
PFNGLPIXELMAPUSVPROC glad_glPixelMapusv = NULL;
627
PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL;
628
PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL;
629
PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf = NULL;
630
PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi = NULL;
631
PFNGLPIXELZOOMPROC glad_glPixelZoom = NULL;
632
PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL;
633
PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL;
634
PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL;
635
PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL;
636
PFNGLPOINTPARAMETERXPROC glad_glPointParameterx = NULL;
637
PFNGLPOINTPARAMETERXVPROC glad_glPointParameterxv = NULL;
638
PFNGLPOINTSIZEPROC glad_glPointSize = NULL;
639
PFNGLPOINTSIZEXPROC glad_glPointSizex = NULL;
640
PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL;
641
PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL;
642
PFNGLPOLYGONOFFSETXPROC glad_glPolygonOffsetx = NULL;
643
PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple = NULL;
644
PFNGLPOPATTRIBPROC glad_glPopAttrib = NULL;
645
PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib = NULL;
646
PFNGLPOPMATRIXPROC glad_glPopMatrix = NULL;
647
PFNGLPOPNAMEPROC glad_glPopName = NULL;
648
PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures = NULL;
649
PFNGLPUSHATTRIBPROC glad_glPushAttrib = NULL;
650
PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib = NULL;
651
PFNGLPUSHMATRIXPROC glad_glPushMatrix = NULL;
652
PFNGLPUSHNAMEPROC glad_glPushName = NULL;
653
PFNGLRASTERPOS2DPROC glad_glRasterPos2d = NULL;
654
PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv = NULL;
655
PFNGLRASTERPOS2FPROC glad_glRasterPos2f = NULL;
656
PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv = NULL;
657
PFNGLRASTERPOS2IPROC glad_glRasterPos2i = NULL;
658
PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv = NULL;
659
PFNGLRASTERPOS2SPROC glad_glRasterPos2s = NULL;
660
PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv = NULL;
661
PFNGLRASTERPOS3DPROC glad_glRasterPos3d = NULL;
662
PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv = NULL;
663
PFNGLRASTERPOS3FPROC glad_glRasterPos3f = NULL;
664
PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv = NULL;
665
PFNGLRASTERPOS3IPROC glad_glRasterPos3i = NULL;
666
PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv = NULL;
667
PFNGLRASTERPOS3SPROC glad_glRasterPos3s = NULL;
668
PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv = NULL;
669
PFNGLRASTERPOS4DPROC glad_glRasterPos4d = NULL;
670
PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv = NULL;
671
PFNGLRASTERPOS4FPROC glad_glRasterPos4f = NULL;
672
PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv = NULL;
673
PFNGLRASTERPOS4IPROC glad_glRasterPos4i = NULL;
674
PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv = NULL;
675
PFNGLRASTERPOS4SPROC glad_glRasterPos4s = NULL;
676
PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv = NULL;
677
PFNGLREADBUFFERPROC glad_glReadBuffer = NULL;
678
PFNGLREADPIXELSPROC glad_glReadPixels = NULL;
679
PFNGLRECTDPROC glad_glRectd = NULL;
680
PFNGLRECTDVPROC glad_glRectdv = NULL;
681
PFNGLRECTFPROC glad_glRectf = NULL;
682
PFNGLRECTFVPROC glad_glRectfv = NULL;
683
PFNGLRECTIPROC glad_glRecti = NULL;
684
PFNGLRECTIVPROC glad_glRectiv = NULL;
685
PFNGLRECTSPROC glad_glRects = NULL;
686
PFNGLRECTSVPROC glad_glRectsv = NULL;
687
PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler = NULL;
688
PFNGLRENDERMODEPROC glad_glRenderMode = NULL;
689
PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL;
690
PFNGLROTATEDPROC glad_glRotated = NULL;
691
PFNGLROTATEFPROC glad_glRotatef = NULL;
692
PFNGLROTATEXPROC glad_glRotatex = NULL;
693
PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL;
694
PFNGLSAMPLECOVERAGEXPROC glad_glSampleCoveragex = NULL;
695
PFNGLSCALEDPROC glad_glScaled = NULL;
696
PFNGLSCALEFPROC glad_glScalef = NULL;
697
PFNGLSCALEXPROC glad_glScalex = NULL;
698
PFNGLSCISSORPROC glad_glScissor = NULL;
699
PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b = NULL;
700
PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv = NULL;
701
PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d = NULL;
702
PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv = NULL;
703
PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f = NULL;
704
PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv = NULL;
705
PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i = NULL;
706
PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv = NULL;
707
PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s = NULL;
708
PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv = NULL;
709
PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub = NULL;
710
PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv = NULL;
711
PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui = NULL;
712
PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv = NULL;
713
PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us = NULL;
714
PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv = NULL;
715
PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer = NULL;
716
PFNGLSELECTBUFFERPROC glad_glSelectBuffer = NULL;
717
PFNGLSHADEMODELPROC glad_glShadeModel = NULL;
718
PFNGLSHADERBINARYPROC glad_glShaderBinary = NULL;
719
PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL;
720
PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL;
721
PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL;
722
PFNGLSTENCILMASKPROC glad_glStencilMask = NULL;
723
PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL;
724
PFNGLSTENCILOPPROC glad_glStencilOp = NULL;
725
PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL;
726
PFNGLTEXCOORD1DPROC glad_glTexCoord1d = NULL;
727
PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv = NULL;
728
PFNGLTEXCOORD1FPROC glad_glTexCoord1f = NULL;
729
PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv = NULL;
730
PFNGLTEXCOORD1IPROC glad_glTexCoord1i = NULL;
731
PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv = NULL;
732
PFNGLTEXCOORD1SPROC glad_glTexCoord1s = NULL;
733
PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv = NULL;
734
PFNGLTEXCOORD2DPROC glad_glTexCoord2d = NULL;
735
PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv = NULL;
736
PFNGLTEXCOORD2FPROC glad_glTexCoord2f = NULL;
737
PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv = NULL;
738
PFNGLTEXCOORD2IPROC glad_glTexCoord2i = NULL;
739
PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv = NULL;
740
PFNGLTEXCOORD2SPROC glad_glTexCoord2s = NULL;
741
PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv = NULL;
742
PFNGLTEXCOORD3DPROC glad_glTexCoord3d = NULL;
743
PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv = NULL;
744
PFNGLTEXCOORD3FPROC glad_glTexCoord3f = NULL;
745
PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv = NULL;
746
PFNGLTEXCOORD3IPROC glad_glTexCoord3i = NULL;
747
PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv = NULL;
748
PFNGLTEXCOORD3SPROC glad_glTexCoord3s = NULL;
749
PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv = NULL;
750
PFNGLTEXCOORD4DPROC glad_glTexCoord4d = NULL;
751
PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv = NULL;
752
PFNGLTEXCOORD4FPROC glad_glTexCoord4f = NULL;
753
PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv = NULL;
754
PFNGLTEXCOORD4IPROC glad_glTexCoord4i = NULL;
755
PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv = NULL;
756
PFNGLTEXCOORD4SPROC glad_glTexCoord4s = NULL;
757
PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv = NULL;
758
PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer = NULL;
759
PFNGLTEXENVFPROC glad_glTexEnvf = NULL;
760
PFNGLTEXENVFVPROC glad_glTexEnvfv = NULL;
761
PFNGLTEXENVIPROC glad_glTexEnvi = NULL;
762
PFNGLTEXENVIVPROC glad_glTexEnviv = NULL;
763
PFNGLTEXENVXPROC glad_glTexEnvx = NULL;
764
PFNGLTEXENVXVPROC glad_glTexEnvxv = NULL;
765
PFNGLTEXGENDPROC glad_glTexGend = NULL;
766
PFNGLTEXGENDVPROC glad_glTexGendv = NULL;
767
PFNGLTEXGENFPROC glad_glTexGenf = NULL;
768
PFNGLTEXGENFVPROC glad_glTexGenfv = NULL;
769
PFNGLTEXGENIPROC glad_glTexGeni = NULL;
770
PFNGLTEXGENIVPROC glad_glTexGeniv = NULL;
771
PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL;
772
PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL;
773
PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL;
774
PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL;
775
PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL;
776
PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL;
777
PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL;
778
PFNGLTEXPARAMETERXPROC glad_glTexParameterx = NULL;
779
PFNGLTEXPARAMETERXVPROC glad_glTexParameterxv = NULL;
780
PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL;
781
PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL;
782
PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL;
783
PFNGLTRANSLATEDPROC glad_glTranslated = NULL;
784
PFNGLTRANSLATEFPROC glad_glTranslatef = NULL;
785
PFNGLTRANSLATEXPROC glad_glTranslatex = NULL;
786
PFNGLUNIFORM1FPROC glad_glUniform1f = NULL;
787
PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL;
788
PFNGLUNIFORM1IPROC glad_glUniform1i = NULL;
789
PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL;
790
PFNGLUNIFORM2FPROC glad_glUniform2f = NULL;
791
PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL;
792
PFNGLUNIFORM2IPROC glad_glUniform2i = NULL;
793
PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL;
794
PFNGLUNIFORM3FPROC glad_glUniform3f = NULL;
795
PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL;
796
PFNGLUNIFORM3IPROC glad_glUniform3i = NULL;
797
PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL;
798
PFNGLUNIFORM4FPROC glad_glUniform4f = NULL;
799
PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL;
800
PFNGLUNIFORM4IPROC glad_glUniform4i = NULL;
801
PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL;
802
PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL;
803
PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL;
804
PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL;
805
PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL;
806
PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL;
807
PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL;
808
PFNGLVERTEX2DPROC glad_glVertex2d = NULL;
809
PFNGLVERTEX2DVPROC glad_glVertex2dv = NULL;
810
PFNGLVERTEX2FPROC glad_glVertex2f = NULL;
811
PFNGLVERTEX2FVPROC glad_glVertex2fv = NULL;
812
PFNGLVERTEX2IPROC glad_glVertex2i = NULL;
813
PFNGLVERTEX2IVPROC glad_glVertex2iv = NULL;
814
PFNGLVERTEX2SPROC glad_glVertex2s = NULL;
815
PFNGLVERTEX2SVPROC glad_glVertex2sv = NULL;
816
PFNGLVERTEX3DPROC glad_glVertex3d = NULL;
817
PFNGLVERTEX3DVPROC glad_glVertex3dv = NULL;
818
PFNGLVERTEX3FPROC glad_glVertex3f = NULL;
819
PFNGLVERTEX3FVPROC glad_glVertex3fv = NULL;
820
PFNGLVERTEX3IPROC glad_glVertex3i = NULL;
821
PFNGLVERTEX3IVPROC glad_glVertex3iv = NULL;
822
PFNGLVERTEX3SPROC glad_glVertex3s = NULL;
823
PFNGLVERTEX3SVPROC glad_glVertex3sv = NULL;
824
PFNGLVERTEX4DPROC glad_glVertex4d = NULL;
825
PFNGLVERTEX4DVPROC glad_glVertex4dv = NULL;
826
PFNGLVERTEX4FPROC glad_glVertex4f = NULL;
827
PFNGLVERTEX4FVPROC glad_glVertex4fv = NULL;
828
PFNGLVERTEX4IPROC glad_glVertex4i = NULL;
829
PFNGLVERTEX4IVPROC glad_glVertex4iv = NULL;
830
PFNGLVERTEX4SPROC glad_glVertex4s = NULL;
831
PFNGLVERTEX4SVPROC glad_glVertex4sv = NULL;
832
PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL;
833
PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL;
834
PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL;
835
PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL;
836
PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL;
837
PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL;
838
PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL;
839
PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL;
840
PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL;
841
PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL;
842
PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL;
843
PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL;
844
PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL;
845
PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL;
846
PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL;
847
PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL;
848
PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL;
849
PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL;
850
PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL;
851
PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL;
852
PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL;
853
PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL;
854
PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL;
855
PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL;
856
PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL;
857
PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL;
858
PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL;
859
PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL;
860
PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL;
861
PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL;
862
PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL;
863
PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL;
864
PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL;
865
PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL;
866
PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL;
867
PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL;
868
PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL;
869
PFNGLVERTEXPOINTERPROC glad_glVertexPointer = NULL;
870
PFNGLVIEWPORTPROC glad_glViewport = NULL;
871
PFNGLWINDOWPOS2DPROC glad_glWindowPos2d = NULL;
872
PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv = NULL;
873
PFNGLWINDOWPOS2FPROC glad_glWindowPos2f = NULL;
874
PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv = NULL;
875
PFNGLWINDOWPOS2IPROC glad_glWindowPos2i = NULL;
876
PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv = NULL;
877
PFNGLWINDOWPOS2SPROC glad_glWindowPos2s = NULL;
878
PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv = NULL;
879
PFNGLWINDOWPOS3DPROC glad_glWindowPos3d = NULL;
880
PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv = NULL;
881
PFNGLWINDOWPOS3FPROC glad_glWindowPos3f = NULL;
882
PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv = NULL;
883
PFNGLWINDOWPOS3IPROC glad_glWindowPos3i = NULL;
884
PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv = NULL;
885
PFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL;
886
PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL;
887
int GLAD_GL_ARB_buffer_storage = 0;
888
int GLAD_GL_ARB_clip_control = 0;
889
int GLAD_GL_ARB_debug_output = 0;
890
int GLAD_GL_ARB_depth_clamp = 0;
891
int GLAD_GL_ARB_map_buffer_range = 0;
892
int GLAD_GL_ARB_shader_texture_lod = 0;
893
int GLAD_GL_ARB_sync = 0;
894
int GLAD_GL_ARB_texture_rectangle = 0;
895
int GLAD_GL_EXT_fog_coord = 0;
896
int GLAD_GL_EXT_framebuffer_object = 0;
897
int GLAD_GL_EXT_texture_compression_s3tc = 0;
898
int GLAD_GL_EXT_texture_filter_anisotropic = 0;
899
int GLAD_GL_NV_fog_distance = 0;
900
int GLAD_GL_NV_multisample_filter_hint = 0;
901
int GLAD_GL_SGIS_fog_function = 0;
902
int GLAD_GL_SGIX_fog_offset = 0;
903
PFNGLBUFFERSTORAGEPROC glad_glBufferStorage = NULL;
904
PFNGLCLIPCONTROLPROC glad_glClipControl = NULL;
905
PFNGLDEBUGMESSAGECONTROLARBPROC glad_glDebugMessageControlARB = NULL;
906
PFNGLDEBUGMESSAGEINSERTARBPROC glad_glDebugMessageInsertARB = NULL;
907
PFNGLDEBUGMESSAGECALLBACKARBPROC glad_glDebugMessageCallbackARB = NULL;
908
PFNGLGETDEBUGMESSAGELOGARBPROC glad_glGetDebugMessageLogARB = NULL;
909
PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL;
910
PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL;
911
PFNGLFENCESYNCPROC glad_glFenceSync = NULL;
912
PFNGLISSYNCPROC glad_glIsSync = NULL;
913
PFNGLDELETESYNCPROC glad_glDeleteSync = NULL;
914
PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL;
915
PFNGLWAITSYNCPROC glad_glWaitSync = NULL;
916
PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL;
917
PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL;
918
PFNGLFOGCOORDFEXTPROC glad_glFogCoordfEXT = NULL;
919
PFNGLFOGCOORDFVEXTPROC glad_glFogCoordfvEXT = NULL;
920
PFNGLFOGCOORDDEXTPROC glad_glFogCoorddEXT = NULL;
921
PFNGLFOGCOORDDVEXTPROC glad_glFogCoorddvEXT = NULL;
922
PFNGLFOGCOORDPOINTEREXTPROC glad_glFogCoordPointerEXT = NULL;
923
PFNGLISRENDERBUFFEREXTPROC glad_glIsRenderbufferEXT = NULL;
924
PFNGLBINDRENDERBUFFEREXTPROC glad_glBindRenderbufferEXT = NULL;
925
PFNGLDELETERENDERBUFFERSEXTPROC glad_glDeleteRenderbuffersEXT = NULL;
926
PFNGLGENRENDERBUFFERSEXTPROC glad_glGenRenderbuffersEXT = NULL;
927
PFNGLRENDERBUFFERSTORAGEEXTPROC glad_glRenderbufferStorageEXT = NULL;
928
PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glad_glGetRenderbufferParameterivEXT = NULL;
929
PFNGLISFRAMEBUFFEREXTPROC glad_glIsFramebufferEXT = NULL;
930
PFNGLBINDFRAMEBUFFEREXTPROC glad_glBindFramebufferEXT = NULL;
931
PFNGLDELETEFRAMEBUFFERSEXTPROC glad_glDeleteFramebuffersEXT = NULL;
932
PFNGLGENFRAMEBUFFERSEXTPROC glad_glGenFramebuffersEXT = NULL;
933
PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glad_glCheckFramebufferStatusEXT = NULL;
934
PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glad_glFramebufferTexture1DEXT = NULL;
935
PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glad_glFramebufferTexture2DEXT = NULL;
936
PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glad_glFramebufferTexture3DEXT = NULL;
937
PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glad_glFramebufferRenderbufferEXT = NULL;
938
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glad_glGetFramebufferAttachmentParameterivEXT = NULL;
939
PFNGLGENERATEMIPMAPEXTPROC glad_glGenerateMipmapEXT = NULL;
940
PFNGLFOGFUNCSGISPROC glad_glFogFuncSGIS = NULL;
941
PFNGLGETFOGFUNCSGISPROC glad_glGetFogFuncSGIS = NULL;
6656 pogokeen 942
static void load_GL_VERSION_1_0(GLADloadproc load) {
943
        if(!GLAD_GL_VERSION_1_0) return;
944
        glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
945
        glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
946
        glad_glHint = (PFNGLHINTPROC)load("glHint");
947
        glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
948
        glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize");
949
        glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode");
950
        glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
951
        glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
952
        glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
953
        glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
954
        glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
955
        glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D");
956
        glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
957
        glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer");
958
        glad_glClear = (PFNGLCLEARPROC)load("glClear");
959
        glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
960
        glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
961
        glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth");
962
        glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
963
        glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
964
        glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
965
        glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
966
        glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
967
        glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
968
        glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
969
        glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
970
        glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp");
971
        glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
972
        glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
973
        glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
974
        glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref");
975
        glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
976
        glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer");
977
        glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
978
        glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
979
        glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev");
980
        glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
981
        glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
982
        glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
983
        glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
984
        glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage");
985
        glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
986
        glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
987
        glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv");
988
        glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv");
989
        glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
990
        glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange");
991
        glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
992
        glad_glNewList = (PFNGLNEWLISTPROC)load("glNewList");
993
        glad_glEndList = (PFNGLENDLISTPROC)load("glEndList");
994
        glad_glCallList = (PFNGLCALLLISTPROC)load("glCallList");
995
        glad_glCallLists = (PFNGLCALLLISTSPROC)load("glCallLists");
996
        glad_glDeleteLists = (PFNGLDELETELISTSPROC)load("glDeleteLists");
997
        glad_glGenLists = (PFNGLGENLISTSPROC)load("glGenLists");
998
        glad_glListBase = (PFNGLLISTBASEPROC)load("glListBase");
999
        glad_glBegin = (PFNGLBEGINPROC)load("glBegin");
1000
        glad_glBitmap = (PFNGLBITMAPPROC)load("glBitmap");
1001
        glad_glColor3b = (PFNGLCOLOR3BPROC)load("glColor3b");
1002
        glad_glColor3bv = (PFNGLCOLOR3BVPROC)load("glColor3bv");
1003
        glad_glColor3d = (PFNGLCOLOR3DPROC)load("glColor3d");
1004
        glad_glColor3dv = (PFNGLCOLOR3DVPROC)load("glColor3dv");
1005
        glad_glColor3f = (PFNGLCOLOR3FPROC)load("glColor3f");
1006
        glad_glColor3fv = (PFNGLCOLOR3FVPROC)load("glColor3fv");
1007
        glad_glColor3i = (PFNGLCOLOR3IPROC)load("glColor3i");
1008
        glad_glColor3iv = (PFNGLCOLOR3IVPROC)load("glColor3iv");
1009
        glad_glColor3s = (PFNGLCOLOR3SPROC)load("glColor3s");
1010
        glad_glColor3sv = (PFNGLCOLOR3SVPROC)load("glColor3sv");
1011
        glad_glColor3ub = (PFNGLCOLOR3UBPROC)load("glColor3ub");
1012
        glad_glColor3ubv = (PFNGLCOLOR3UBVPROC)load("glColor3ubv");
1013
        glad_glColor3ui = (PFNGLCOLOR3UIPROC)load("glColor3ui");
1014
        glad_glColor3uiv = (PFNGLCOLOR3UIVPROC)load("glColor3uiv");
1015
        glad_glColor3us = (PFNGLCOLOR3USPROC)load("glColor3us");
1016
        glad_glColor3usv = (PFNGLCOLOR3USVPROC)load("glColor3usv");
1017
        glad_glColor4b = (PFNGLCOLOR4BPROC)load("glColor4b");
1018
        glad_glColor4bv = (PFNGLCOLOR4BVPROC)load("glColor4bv");
1019
        glad_glColor4d = (PFNGLCOLOR4DPROC)load("glColor4d");
1020
        glad_glColor4dv = (PFNGLCOLOR4DVPROC)load("glColor4dv");
1021
        glad_glColor4f = (PFNGLCOLOR4FPROC)load("glColor4f");
1022
        glad_glColor4fv = (PFNGLCOLOR4FVPROC)load("glColor4fv");
1023
        glad_glColor4i = (PFNGLCOLOR4IPROC)load("glColor4i");
1024
        glad_glColor4iv = (PFNGLCOLOR4IVPROC)load("glColor4iv");
1025
        glad_glColor4s = (PFNGLCOLOR4SPROC)load("glColor4s");
1026
        glad_glColor4sv = (PFNGLCOLOR4SVPROC)load("glColor4sv");
1027
        glad_glColor4ub = (PFNGLCOLOR4UBPROC)load("glColor4ub");
1028
        glad_glColor4ubv = (PFNGLCOLOR4UBVPROC)load("glColor4ubv");
1029
        glad_glColor4ui = (PFNGLCOLOR4UIPROC)load("glColor4ui");
1030
        glad_glColor4uiv = (PFNGLCOLOR4UIVPROC)load("glColor4uiv");
1031
        glad_glColor4us = (PFNGLCOLOR4USPROC)load("glColor4us");
1032
        glad_glColor4usv = (PFNGLCOLOR4USVPROC)load("glColor4usv");
1033
        glad_glEdgeFlag = (PFNGLEDGEFLAGPROC)load("glEdgeFlag");
1034
        glad_glEdgeFlagv = (PFNGLEDGEFLAGVPROC)load("glEdgeFlagv");
1035
        glad_glEnd = (PFNGLENDPROC)load("glEnd");
1036
        glad_glIndexd = (PFNGLINDEXDPROC)load("glIndexd");
1037
        glad_glIndexdv = (PFNGLINDEXDVPROC)load("glIndexdv");
1038
        glad_glIndexf = (PFNGLINDEXFPROC)load("glIndexf");
1039
        glad_glIndexfv = (PFNGLINDEXFVPROC)load("glIndexfv");
1040
        glad_glIndexi = (PFNGLINDEXIPROC)load("glIndexi");
1041
        glad_glIndexiv = (PFNGLINDEXIVPROC)load("glIndexiv");
1042
        glad_glIndexs = (PFNGLINDEXSPROC)load("glIndexs");
1043
        glad_glIndexsv = (PFNGLINDEXSVPROC)load("glIndexsv");
1044
        glad_glNormal3b = (PFNGLNORMAL3BPROC)load("glNormal3b");
1045
        glad_glNormal3bv = (PFNGLNORMAL3BVPROC)load("glNormal3bv");
1046
        glad_glNormal3d = (PFNGLNORMAL3DPROC)load("glNormal3d");
1047
        glad_glNormal3dv = (PFNGLNORMAL3DVPROC)load("glNormal3dv");
1048
        glad_glNormal3f = (PFNGLNORMAL3FPROC)load("glNormal3f");
1049
        glad_glNormal3fv = (PFNGLNORMAL3FVPROC)load("glNormal3fv");
1050
        glad_glNormal3i = (PFNGLNORMAL3IPROC)load("glNormal3i");
1051
        glad_glNormal3iv = (PFNGLNORMAL3IVPROC)load("glNormal3iv");
1052
        glad_glNormal3s = (PFNGLNORMAL3SPROC)load("glNormal3s");
1053
        glad_glNormal3sv = (PFNGLNORMAL3SVPROC)load("glNormal3sv");
1054
        glad_glRasterPos2d = (PFNGLRASTERPOS2DPROC)load("glRasterPos2d");
1055
        glad_glRasterPos2dv = (PFNGLRASTERPOS2DVPROC)load("glRasterPos2dv");
1056
        glad_glRasterPos2f = (PFNGLRASTERPOS2FPROC)load("glRasterPos2f");
1057
        glad_glRasterPos2fv = (PFNGLRASTERPOS2FVPROC)load("glRasterPos2fv");
1058
        glad_glRasterPos2i = (PFNGLRASTERPOS2IPROC)load("glRasterPos2i");
1059
        glad_glRasterPos2iv = (PFNGLRASTERPOS2IVPROC)load("glRasterPos2iv");
1060
        glad_glRasterPos2s = (PFNGLRASTERPOS2SPROC)load("glRasterPos2s");
1061
        glad_glRasterPos2sv = (PFNGLRASTERPOS2SVPROC)load("glRasterPos2sv");
1062
        glad_glRasterPos3d = (PFNGLRASTERPOS3DPROC)load("glRasterPos3d");
1063
        glad_glRasterPos3dv = (PFNGLRASTERPOS3DVPROC)load("glRasterPos3dv");
1064
        glad_glRasterPos3f = (PFNGLRASTERPOS3FPROC)load("glRasterPos3f");
1065
        glad_glRasterPos3fv = (PFNGLRASTERPOS3FVPROC)load("glRasterPos3fv");
1066
        glad_glRasterPos3i = (PFNGLRASTERPOS3IPROC)load("glRasterPos3i");
1067
        glad_glRasterPos3iv = (PFNGLRASTERPOS3IVPROC)load("glRasterPos3iv");
1068
        glad_glRasterPos3s = (PFNGLRASTERPOS3SPROC)load("glRasterPos3s");
1069
        glad_glRasterPos3sv = (PFNGLRASTERPOS3SVPROC)load("glRasterPos3sv");
1070
        glad_glRasterPos4d = (PFNGLRASTERPOS4DPROC)load("glRasterPos4d");
1071
        glad_glRasterPos4dv = (PFNGLRASTERPOS4DVPROC)load("glRasterPos4dv");
1072
        glad_glRasterPos4f = (PFNGLRASTERPOS4FPROC)load("glRasterPos4f");
1073
        glad_glRasterPos4fv = (PFNGLRASTERPOS4FVPROC)load("glRasterPos4fv");
1074
        glad_glRasterPos4i = (PFNGLRASTERPOS4IPROC)load("glRasterPos4i");
1075
        glad_glRasterPos4iv = (PFNGLRASTERPOS4IVPROC)load("glRasterPos4iv");
1076
        glad_glRasterPos4s = (PFNGLRASTERPOS4SPROC)load("glRasterPos4s");
1077
        glad_glRasterPos4sv = (PFNGLRASTERPOS4SVPROC)load("glRasterPos4sv");
1078
        glad_glRectd = (PFNGLRECTDPROC)load("glRectd");
1079
        glad_glRectdv = (PFNGLRECTDVPROC)load("glRectdv");
1080
        glad_glRectf = (PFNGLRECTFPROC)load("glRectf");
1081
        glad_glRectfv = (PFNGLRECTFVPROC)load("glRectfv");
1082
        glad_glRecti = (PFNGLRECTIPROC)load("glRecti");
1083
        glad_glRectiv = (PFNGLRECTIVPROC)load("glRectiv");
1084
        glad_glRects = (PFNGLRECTSPROC)load("glRects");
1085
        glad_glRectsv = (PFNGLRECTSVPROC)load("glRectsv");
1086
        glad_glTexCoord1d = (PFNGLTEXCOORD1DPROC)load("glTexCoord1d");
1087
        glad_glTexCoord1dv = (PFNGLTEXCOORD1DVPROC)load("glTexCoord1dv");
1088
        glad_glTexCoord1f = (PFNGLTEXCOORD1FPROC)load("glTexCoord1f");
1089
        glad_glTexCoord1fv = (PFNGLTEXCOORD1FVPROC)load("glTexCoord1fv");
1090
        glad_glTexCoord1i = (PFNGLTEXCOORD1IPROC)load("glTexCoord1i");
1091
        glad_glTexCoord1iv = (PFNGLTEXCOORD1IVPROC)load("glTexCoord1iv");
1092
        glad_glTexCoord1s = (PFNGLTEXCOORD1SPROC)load("glTexCoord1s");
1093
        glad_glTexCoord1sv = (PFNGLTEXCOORD1SVPROC)load("glTexCoord1sv");
1094
        glad_glTexCoord2d = (PFNGLTEXCOORD2DPROC)load("glTexCoord2d");
1095
        glad_glTexCoord2dv = (PFNGLTEXCOORD2DVPROC)load("glTexCoord2dv");
1096
        glad_glTexCoord2f = (PFNGLTEXCOORD2FPROC)load("glTexCoord2f");
1097
        glad_glTexCoord2fv = (PFNGLTEXCOORD2FVPROC)load("glTexCoord2fv");
1098
        glad_glTexCoord2i = (PFNGLTEXCOORD2IPROC)load("glTexCoord2i");
1099
        glad_glTexCoord2iv = (PFNGLTEXCOORD2IVPROC)load("glTexCoord2iv");
1100
        glad_glTexCoord2s = (PFNGLTEXCOORD2SPROC)load("glTexCoord2s");
1101
        glad_glTexCoord2sv = (PFNGLTEXCOORD2SVPROC)load("glTexCoord2sv");
1102
        glad_glTexCoord3d = (PFNGLTEXCOORD3DPROC)load("glTexCoord3d");
1103
        glad_glTexCoord3dv = (PFNGLTEXCOORD3DVPROC)load("glTexCoord3dv");
1104
        glad_glTexCoord3f = (PFNGLTEXCOORD3FPROC)load("glTexCoord3f");
1105
        glad_glTexCoord3fv = (PFNGLTEXCOORD3FVPROC)load("glTexCoord3fv");
1106
        glad_glTexCoord3i = (PFNGLTEXCOORD3IPROC)load("glTexCoord3i");
1107
        glad_glTexCoord3iv = (PFNGLTEXCOORD3IVPROC)load("glTexCoord3iv");
1108
        glad_glTexCoord3s = (PFNGLTEXCOORD3SPROC)load("glTexCoord3s");
1109
        glad_glTexCoord3sv = (PFNGLTEXCOORD3SVPROC)load("glTexCoord3sv");
1110
        glad_glTexCoord4d = (PFNGLTEXCOORD4DPROC)load("glTexCoord4d");
1111
        glad_glTexCoord4dv = (PFNGLTEXCOORD4DVPROC)load("glTexCoord4dv");
1112
        glad_glTexCoord4f = (PFNGLTEXCOORD4FPROC)load("glTexCoord4f");
1113
        glad_glTexCoord4fv = (PFNGLTEXCOORD4FVPROC)load("glTexCoord4fv");
1114
        glad_glTexCoord4i = (PFNGLTEXCOORD4IPROC)load("glTexCoord4i");
1115
        glad_glTexCoord4iv = (PFNGLTEXCOORD4IVPROC)load("glTexCoord4iv");
1116
        glad_glTexCoord4s = (PFNGLTEXCOORD4SPROC)load("glTexCoord4s");
1117
        glad_glTexCoord4sv = (PFNGLTEXCOORD4SVPROC)load("glTexCoord4sv");
1118
        glad_glVertex2d = (PFNGLVERTEX2DPROC)load("glVertex2d");
1119
        glad_glVertex2dv = (PFNGLVERTEX2DVPROC)load("glVertex2dv");
1120
        glad_glVertex2f = (PFNGLVERTEX2FPROC)load("glVertex2f");
1121
        glad_glVertex2fv = (PFNGLVERTEX2FVPROC)load("glVertex2fv");
1122
        glad_glVertex2i = (PFNGLVERTEX2IPROC)load("glVertex2i");
1123
        glad_glVertex2iv = (PFNGLVERTEX2IVPROC)load("glVertex2iv");
1124
        glad_glVertex2s = (PFNGLVERTEX2SPROC)load("glVertex2s");
1125
        glad_glVertex2sv = (PFNGLVERTEX2SVPROC)load("glVertex2sv");
1126
        glad_glVertex3d = (PFNGLVERTEX3DPROC)load("glVertex3d");
1127
        glad_glVertex3dv = (PFNGLVERTEX3DVPROC)load("glVertex3dv");
1128
        glad_glVertex3f = (PFNGLVERTEX3FPROC)load("glVertex3f");
1129
        glad_glVertex3fv = (PFNGLVERTEX3FVPROC)load("glVertex3fv");
1130
        glad_glVertex3i = (PFNGLVERTEX3IPROC)load("glVertex3i");
1131
        glad_glVertex3iv = (PFNGLVERTEX3IVPROC)load("glVertex3iv");
1132
        glad_glVertex3s = (PFNGLVERTEX3SPROC)load("glVertex3s");
1133
        glad_glVertex3sv = (PFNGLVERTEX3SVPROC)load("glVertex3sv");
1134
        glad_glVertex4d = (PFNGLVERTEX4DPROC)load("glVertex4d");
1135
        glad_glVertex4dv = (PFNGLVERTEX4DVPROC)load("glVertex4dv");
1136
        glad_glVertex4f = (PFNGLVERTEX4FPROC)load("glVertex4f");
1137
        glad_glVertex4fv = (PFNGLVERTEX4FVPROC)load("glVertex4fv");
1138
        glad_glVertex4i = (PFNGLVERTEX4IPROC)load("glVertex4i");
1139
        glad_glVertex4iv = (PFNGLVERTEX4IVPROC)load("glVertex4iv");
1140
        glad_glVertex4s = (PFNGLVERTEX4SPROC)load("glVertex4s");
1141
        glad_glVertex4sv = (PFNGLVERTEX4SVPROC)load("glVertex4sv");
1142
        glad_glClipPlane = (PFNGLCLIPPLANEPROC)load("glClipPlane");
1143
        glad_glColorMaterial = (PFNGLCOLORMATERIALPROC)load("glColorMaterial");
1144
        glad_glFogf = (PFNGLFOGFPROC)load("glFogf");
1145
        glad_glFogfv = (PFNGLFOGFVPROC)load("glFogfv");
1146
        glad_glFogi = (PFNGLFOGIPROC)load("glFogi");
1147
        glad_glFogiv = (PFNGLFOGIVPROC)load("glFogiv");
1148
        glad_glLightf = (PFNGLLIGHTFPROC)load("glLightf");
1149
        glad_glLightfv = (PFNGLLIGHTFVPROC)load("glLightfv");
1150
        glad_glLighti = (PFNGLLIGHTIPROC)load("glLighti");
1151
        glad_glLightiv = (PFNGLLIGHTIVPROC)load("glLightiv");
1152
        glad_glLightModelf = (PFNGLLIGHTMODELFPROC)load("glLightModelf");
1153
        glad_glLightModelfv = (PFNGLLIGHTMODELFVPROC)load("glLightModelfv");
1154
        glad_glLightModeli = (PFNGLLIGHTMODELIPROC)load("glLightModeli");
1155
        glad_glLightModeliv = (PFNGLLIGHTMODELIVPROC)load("glLightModeliv");
1156
        glad_glLineStipple = (PFNGLLINESTIPPLEPROC)load("glLineStipple");
1157
        glad_glMaterialf = (PFNGLMATERIALFPROC)load("glMaterialf");
1158
        glad_glMaterialfv = (PFNGLMATERIALFVPROC)load("glMaterialfv");
1159
        glad_glMateriali = (PFNGLMATERIALIPROC)load("glMateriali");
1160
        glad_glMaterialiv = (PFNGLMATERIALIVPROC)load("glMaterialiv");
1161
        glad_glPolygonStipple = (PFNGLPOLYGONSTIPPLEPROC)load("glPolygonStipple");
1162
        glad_glShadeModel = (PFNGLSHADEMODELPROC)load("glShadeModel");
1163
        glad_glTexEnvf = (PFNGLTEXENVFPROC)load("glTexEnvf");
1164
        glad_glTexEnvfv = (PFNGLTEXENVFVPROC)load("glTexEnvfv");
1165
        glad_glTexEnvi = (PFNGLTEXENVIPROC)load("glTexEnvi");
1166
        glad_glTexEnviv = (PFNGLTEXENVIVPROC)load("glTexEnviv");
1167
        glad_glTexGend = (PFNGLTEXGENDPROC)load("glTexGend");
1168
        glad_glTexGendv = (PFNGLTEXGENDVPROC)load("glTexGendv");
1169
        glad_glTexGenf = (PFNGLTEXGENFPROC)load("glTexGenf");
1170
        glad_glTexGenfv = (PFNGLTEXGENFVPROC)load("glTexGenfv");
1171
        glad_glTexGeni = (PFNGLTEXGENIPROC)load("glTexGeni");
1172
        glad_glTexGeniv = (PFNGLTEXGENIVPROC)load("glTexGeniv");
1173
        glad_glFeedbackBuffer = (PFNGLFEEDBACKBUFFERPROC)load("glFeedbackBuffer");
1174
        glad_glSelectBuffer = (PFNGLSELECTBUFFERPROC)load("glSelectBuffer");
1175
        glad_glRenderMode = (PFNGLRENDERMODEPROC)load("glRenderMode");
1176
        glad_glInitNames = (PFNGLINITNAMESPROC)load("glInitNames");
1177
        glad_glLoadName = (PFNGLLOADNAMEPROC)load("glLoadName");
1178
        glad_glPassThrough = (PFNGLPASSTHROUGHPROC)load("glPassThrough");
1179
        glad_glPopName = (PFNGLPOPNAMEPROC)load("glPopName");
1180
        glad_glPushName = (PFNGLPUSHNAMEPROC)load("glPushName");
1181
        glad_glClearAccum = (PFNGLCLEARACCUMPROC)load("glClearAccum");
1182
        glad_glClearIndex = (PFNGLCLEARINDEXPROC)load("glClearIndex");
1183
        glad_glIndexMask = (PFNGLINDEXMASKPROC)load("glIndexMask");
1184
        glad_glAccum = (PFNGLACCUMPROC)load("glAccum");
1185
        glad_glPopAttrib = (PFNGLPOPATTRIBPROC)load("glPopAttrib");
1186
        glad_glPushAttrib = (PFNGLPUSHATTRIBPROC)load("glPushAttrib");
1187
        glad_glMap1d = (PFNGLMAP1DPROC)load("glMap1d");
1188
        glad_glMap1f = (PFNGLMAP1FPROC)load("glMap1f");
1189
        glad_glMap2d = (PFNGLMAP2DPROC)load("glMap2d");
1190
        glad_glMap2f = (PFNGLMAP2FPROC)load("glMap2f");
1191
        glad_glMapGrid1d = (PFNGLMAPGRID1DPROC)load("glMapGrid1d");
1192
        glad_glMapGrid1f = (PFNGLMAPGRID1FPROC)load("glMapGrid1f");
1193
        glad_glMapGrid2d = (PFNGLMAPGRID2DPROC)load("glMapGrid2d");
1194
        glad_glMapGrid2f = (PFNGLMAPGRID2FPROC)load("glMapGrid2f");
1195
        glad_glEvalCoord1d = (PFNGLEVALCOORD1DPROC)load("glEvalCoord1d");
1196
        glad_glEvalCoord1dv = (PFNGLEVALCOORD1DVPROC)load("glEvalCoord1dv");
1197
        glad_glEvalCoord1f = (PFNGLEVALCOORD1FPROC)load("glEvalCoord1f");
1198
        glad_glEvalCoord1fv = (PFNGLEVALCOORD1FVPROC)load("glEvalCoord1fv");
1199
        glad_glEvalCoord2d = (PFNGLEVALCOORD2DPROC)load("glEvalCoord2d");
1200
        glad_glEvalCoord2dv = (PFNGLEVALCOORD2DVPROC)load("glEvalCoord2dv");
1201
        glad_glEvalCoord2f = (PFNGLEVALCOORD2FPROC)load("glEvalCoord2f");
1202
        glad_glEvalCoord2fv = (PFNGLEVALCOORD2FVPROC)load("glEvalCoord2fv");
1203
        glad_glEvalMesh1 = (PFNGLEVALMESH1PROC)load("glEvalMesh1");
1204
        glad_glEvalPoint1 = (PFNGLEVALPOINT1PROC)load("glEvalPoint1");
1205
        glad_glEvalMesh2 = (PFNGLEVALMESH2PROC)load("glEvalMesh2");
1206
        glad_glEvalPoint2 = (PFNGLEVALPOINT2PROC)load("glEvalPoint2");
1207
        glad_glAlphaFunc = (PFNGLALPHAFUNCPROC)load("glAlphaFunc");
1208
        glad_glPixelZoom = (PFNGLPIXELZOOMPROC)load("glPixelZoom");
1209
        glad_glPixelTransferf = (PFNGLPIXELTRANSFERFPROC)load("glPixelTransferf");
1210
        glad_glPixelTransferi = (PFNGLPIXELTRANSFERIPROC)load("glPixelTransferi");
1211
        glad_glPixelMapfv = (PFNGLPIXELMAPFVPROC)load("glPixelMapfv");
1212
        glad_glPixelMapuiv = (PFNGLPIXELMAPUIVPROC)load("glPixelMapuiv");
1213
        glad_glPixelMapusv = (PFNGLPIXELMAPUSVPROC)load("glPixelMapusv");
1214
        glad_glCopyPixels = (PFNGLCOPYPIXELSPROC)load("glCopyPixels");
1215
        glad_glDrawPixels = (PFNGLDRAWPIXELSPROC)load("glDrawPixels");
1216
        glad_glGetClipPlane = (PFNGLGETCLIPPLANEPROC)load("glGetClipPlane");
1217
        glad_glGetLightfv = (PFNGLGETLIGHTFVPROC)load("glGetLightfv");
1218
        glad_glGetLightiv = (PFNGLGETLIGHTIVPROC)load("glGetLightiv");
1219
        glad_glGetMapdv = (PFNGLGETMAPDVPROC)load("glGetMapdv");
1220
        glad_glGetMapfv = (PFNGLGETMAPFVPROC)load("glGetMapfv");
1221
        glad_glGetMapiv = (PFNGLGETMAPIVPROC)load("glGetMapiv");
1222
        glad_glGetMaterialfv = (PFNGLGETMATERIALFVPROC)load("glGetMaterialfv");
1223
        glad_glGetMaterialiv = (PFNGLGETMATERIALIVPROC)load("glGetMaterialiv");
1224
        glad_glGetPixelMapfv = (PFNGLGETPIXELMAPFVPROC)load("glGetPixelMapfv");
1225
        glad_glGetPixelMapuiv = (PFNGLGETPIXELMAPUIVPROC)load("glGetPixelMapuiv");
1226
        glad_glGetPixelMapusv = (PFNGLGETPIXELMAPUSVPROC)load("glGetPixelMapusv");
1227
        glad_glGetPolygonStipple = (PFNGLGETPOLYGONSTIPPLEPROC)load("glGetPolygonStipple");
1228
        glad_glGetTexEnvfv = (PFNGLGETTEXENVFVPROC)load("glGetTexEnvfv");
1229
        glad_glGetTexEnviv = (PFNGLGETTEXENVIVPROC)load("glGetTexEnviv");
1230
        glad_glGetTexGendv = (PFNGLGETTEXGENDVPROC)load("glGetTexGendv");
1231
        glad_glGetTexGenfv = (PFNGLGETTEXGENFVPROC)load("glGetTexGenfv");
1232
        glad_glGetTexGeniv = (PFNGLGETTEXGENIVPROC)load("glGetTexGeniv");
1233
        glad_glIsList = (PFNGLISLISTPROC)load("glIsList");
1234
        glad_glFrustum = (PFNGLFRUSTUMPROC)load("glFrustum");
1235
        glad_glLoadIdentity = (PFNGLLOADIDENTITYPROC)load("glLoadIdentity");
1236
        glad_glLoadMatrixf = (PFNGLLOADMATRIXFPROC)load("glLoadMatrixf");
1237
        glad_glLoadMatrixd = (PFNGLLOADMATRIXDPROC)load("glLoadMatrixd");
1238
        glad_glMatrixMode = (PFNGLMATRIXMODEPROC)load("glMatrixMode");
1239
        glad_glMultMatrixf = (PFNGLMULTMATRIXFPROC)load("glMultMatrixf");
1240
        glad_glMultMatrixd = (PFNGLMULTMATRIXDPROC)load("glMultMatrixd");
1241
        glad_glOrtho = (PFNGLORTHOPROC)load("glOrtho");
1242
        glad_glPopMatrix = (PFNGLPOPMATRIXPROC)load("glPopMatrix");
1243
        glad_glPushMatrix = (PFNGLPUSHMATRIXPROC)load("glPushMatrix");
1244
        glad_glRotated = (PFNGLROTATEDPROC)load("glRotated");
1245
        glad_glRotatef = (PFNGLROTATEFPROC)load("glRotatef");
1246
        glad_glScaled = (PFNGLSCALEDPROC)load("glScaled");
1247
        glad_glScalef = (PFNGLSCALEFPROC)load("glScalef");
1248
        glad_glTranslated = (PFNGLTRANSLATEDPROC)load("glTranslated");
1249
        glad_glTranslatef = (PFNGLTRANSLATEFPROC)load("glTranslatef");
1250
}
1251
static void load_GL_VERSION_1_1(GLADloadproc load) {
1252
        if(!GLAD_GL_VERSION_1_1) return;
1253
        glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
1254
        glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
1255
        glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv");
1256
        glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
1257
        glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D");
1258
        glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
1259
        glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D");
1260
        glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
1261
        glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D");
1262
        glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
1263
        glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
1264
        glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
1265
        glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
1266
        glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
1267
        glad_glArrayElement = (PFNGLARRAYELEMENTPROC)load("glArrayElement");
1268
        glad_glColorPointer = (PFNGLCOLORPOINTERPROC)load("glColorPointer");
1269
        glad_glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC)load("glDisableClientState");
1270
        glad_glEdgeFlagPointer = (PFNGLEDGEFLAGPOINTERPROC)load("glEdgeFlagPointer");
1271
        glad_glEnableClientState = (PFNGLENABLECLIENTSTATEPROC)load("glEnableClientState");
1272
        glad_glIndexPointer = (PFNGLINDEXPOINTERPROC)load("glIndexPointer");
1273
        glad_glInterleavedArrays = (PFNGLINTERLEAVEDARRAYSPROC)load("glInterleavedArrays");
1274
        glad_glNormalPointer = (PFNGLNORMALPOINTERPROC)load("glNormalPointer");
1275
        glad_glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC)load("glTexCoordPointer");
1276
        glad_glVertexPointer = (PFNGLVERTEXPOINTERPROC)load("glVertexPointer");
1277
        glad_glAreTexturesResident = (PFNGLARETEXTURESRESIDENTPROC)load("glAreTexturesResident");
1278
        glad_glPrioritizeTextures = (PFNGLPRIORITIZETEXTURESPROC)load("glPrioritizeTextures");
1279
        glad_glIndexub = (PFNGLINDEXUBPROC)load("glIndexub");
1280
        glad_glIndexubv = (PFNGLINDEXUBVPROC)load("glIndexubv");
1281
        glad_glPopClientAttrib = (PFNGLPOPCLIENTATTRIBPROC)load("glPopClientAttrib");
1282
        glad_glPushClientAttrib = (PFNGLPUSHCLIENTATTRIBPROC)load("glPushClientAttrib");
1283
}
1284
static void load_GL_VERSION_1_2(GLADloadproc load) {
1285
        if(!GLAD_GL_VERSION_1_2) return;
1286
        glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements");
1287
        glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D");
1288
        glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D");
1289
        glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D");
1290
}
1291
static void load_GL_VERSION_1_3(GLADloadproc load) {
1292
        if(!GLAD_GL_VERSION_1_3) return;
1293
        glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
1294
        glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
1295
        glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D");
1296
        glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
1297
        glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D");
1298
        glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D");
1299
        glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
1300
        glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D");
1301
        glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage");
1302
        glad_glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)load("glClientActiveTexture");
1303
        glad_glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC)load("glMultiTexCoord1d");
1304
        glad_glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC)load("glMultiTexCoord1dv");
1305
        glad_glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC)load("glMultiTexCoord1f");
1306
        glad_glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC)load("glMultiTexCoord1fv");
1307
        glad_glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC)load("glMultiTexCoord1i");
1308
        glad_glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC)load("glMultiTexCoord1iv");
1309
        glad_glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC)load("glMultiTexCoord1s");
1310
        glad_glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC)load("glMultiTexCoord1sv");
1311
        glad_glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC)load("glMultiTexCoord2d");
1312
        glad_glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC)load("glMultiTexCoord2dv");
1313
        glad_glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC)load("glMultiTexCoord2f");
1314
        glad_glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC)load("glMultiTexCoord2fv");
1315
        glad_glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC)load("glMultiTexCoord2i");
1316
        glad_glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC)load("glMultiTexCoord2iv");
1317
        glad_glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC)load("glMultiTexCoord2s");
1318
        glad_glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC)load("glMultiTexCoord2sv");
1319
        glad_glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC)load("glMultiTexCoord3d");
1320
        glad_glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC)load("glMultiTexCoord3dv");
1321
        glad_glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC)load("glMultiTexCoord3f");
1322
        glad_glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC)load("glMultiTexCoord3fv");
1323
        glad_glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC)load("glMultiTexCoord3i");
1324
        glad_glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC)load("glMultiTexCoord3iv");
1325
        glad_glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC)load("glMultiTexCoord3s");
1326
        glad_glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC)load("glMultiTexCoord3sv");
1327
        glad_glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC)load("glMultiTexCoord4d");
1328
        glad_glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC)load("glMultiTexCoord4dv");
1329
        glad_glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)load("glMultiTexCoord4f");
1330
        glad_glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC)load("glMultiTexCoord4fv");
1331
        glad_glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC)load("glMultiTexCoord4i");
1332
        glad_glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC)load("glMultiTexCoord4iv");
1333
        glad_glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC)load("glMultiTexCoord4s");
1334
        glad_glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC)load("glMultiTexCoord4sv");
1335
        glad_glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC)load("glLoadTransposeMatrixf");
1336
        glad_glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC)load("glLoadTransposeMatrixd");
1337
        glad_glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC)load("glMultTransposeMatrixf");
1338
        glad_glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC)load("glMultTransposeMatrixd");
1339
}
1340
static void load_GL_VERSION_1_4(GLADloadproc load) {
1341
        if(!GLAD_GL_VERSION_1_4) return;
1342
        glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate");
1343
        glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays");
1344
        glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements");
1345
        glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf");
1346
        glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv");
1347
        glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri");
1348
        glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv");
1349
        glad_glFogCoordf = (PFNGLFOGCOORDFPROC)load("glFogCoordf");
1350
        glad_glFogCoordfv = (PFNGLFOGCOORDFVPROC)load("glFogCoordfv");
1351
        glad_glFogCoordd = (PFNGLFOGCOORDDPROC)load("glFogCoordd");
1352
        glad_glFogCoorddv = (PFNGLFOGCOORDDVPROC)load("glFogCoorddv");
1353
        glad_glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC)load("glFogCoordPointer");
1354
        glad_glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC)load("glSecondaryColor3b");
1355
        glad_glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC)load("glSecondaryColor3bv");
1356
        glad_glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC)load("glSecondaryColor3d");
1357
        glad_glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC)load("glSecondaryColor3dv");
1358
        glad_glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC)load("glSecondaryColor3f");
1359
        glad_glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC)load("glSecondaryColor3fv");
1360
        glad_glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC)load("glSecondaryColor3i");
1361
        glad_glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC)load("glSecondaryColor3iv");
1362
        glad_glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC)load("glSecondaryColor3s");
1363
        glad_glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC)load("glSecondaryColor3sv");
1364
        glad_glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC)load("glSecondaryColor3ub");
1365
        glad_glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC)load("glSecondaryColor3ubv");
1366
        glad_glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC)load("glSecondaryColor3ui");
1367
        glad_glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC)load("glSecondaryColor3uiv");
1368
        glad_glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC)load("glSecondaryColor3us");
1369
        glad_glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC)load("glSecondaryColor3usv");
1370
        glad_glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)load("glSecondaryColorPointer");
1371
        glad_glWindowPos2d = (PFNGLWINDOWPOS2DPROC)load("glWindowPos2d");
1372
        glad_glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC)load("glWindowPos2dv");
1373
        glad_glWindowPos2f = (PFNGLWINDOWPOS2FPROC)load("glWindowPos2f");
1374
        glad_glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC)load("glWindowPos2fv");
1375
        glad_glWindowPos2i = (PFNGLWINDOWPOS2IPROC)load("glWindowPos2i");
1376
        glad_glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC)load("glWindowPos2iv");
1377
        glad_glWindowPos2s = (PFNGLWINDOWPOS2SPROC)load("glWindowPos2s");
1378
        glad_glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC)load("glWindowPos2sv");
1379
        glad_glWindowPos3d = (PFNGLWINDOWPOS3DPROC)load("glWindowPos3d");
1380
        glad_glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC)load("glWindowPos3dv");
1381
        glad_glWindowPos3f = (PFNGLWINDOWPOS3FPROC)load("glWindowPos3f");
1382
        glad_glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC)load("glWindowPos3fv");
1383
        glad_glWindowPos3i = (PFNGLWINDOWPOS3IPROC)load("glWindowPos3i");
1384
        glad_glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC)load("glWindowPos3iv");
1385
        glad_glWindowPos3s = (PFNGLWINDOWPOS3SPROC)load("glWindowPos3s");
1386
        glad_glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC)load("glWindowPos3sv");
1387
        glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor");
1388
        glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation");
1389
}
1390
static void load_GL_VERSION_1_5(GLADloadproc load) {
1391
        if(!GLAD_GL_VERSION_1_5) return;
1392
        glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries");
1393
        glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries");
1394
        glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery");
1395
        glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery");
1396
        glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery");
1397
        glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv");
1398
        glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv");
1399
        glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv");
1400
        glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer");
1401
        glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers");
1402
        glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers");
1403
        glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer");
1404
        glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData");
1405
        glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData");
1406
        glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData");
1407
        glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer");
1408
        glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer");
1409
        glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv");
1410
        glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv");
1411
}
1412
static void load_GL_VERSION_2_0(GLADloadproc load) {
1413
        if(!GLAD_GL_VERSION_2_0) return;
1414
        glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate");
1415
        glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers");
1416
        glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate");
1417
        glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate");
1418
        glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate");
1419
        glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader");
1420
        glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation");
1421
        glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader");
1422
        glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram");
1423
        glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader");
1424
        glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram");
1425
        glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader");
1426
        glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader");
1427
        glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray");
1428
        glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray");
1429
        glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib");
1430
        glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform");
1431
        glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders");
1432
        glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation");
1433
        glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv");
1434
        glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog");
1435
        glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv");
1436
        glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog");
1437
        glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource");
1438
        glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation");
1439
        glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv");
1440
        glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv");
1441
        glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv");
1442
        glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv");
1443
        glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv");
1444
        glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv");
1445
        glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram");
1446
        glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader");
1447
        glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram");
1448
        glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource");
1449
        glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram");
1450
        glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f");
1451
        glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f");
1452
        glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f");
1453
        glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f");
1454
        glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i");
1455
        glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i");
1456
        glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i");
1457
        glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i");
1458
        glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv");
1459
        glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv");
1460
        glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv");
1461
        glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv");
1462
        glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv");
1463
        glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv");
1464
        glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv");
1465
        glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv");
1466
        glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv");
1467
        glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv");
1468
        glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv");
1469
        glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram");
1470
        glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d");
1471
        glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv");
1472
        glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f");
1473
        glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv");
1474
        glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s");
1475
        glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv");
1476
        glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d");
1477
        glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv");
1478
        glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f");
1479
        glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv");
1480
        glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s");
1481
        glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv");
1482
        glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d");
1483
        glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv");
1484
        glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f");
1485
        glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv");
1486
        glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s");
1487
        glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv");
1488
        glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv");
1489
        glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv");
1490
        glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv");
1491
        glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub");
1492
        glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv");
1493
        glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv");
1494
        glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv");
1495
        glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv");
1496
        glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d");
1497
        glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv");
1498
        glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f");
1499
        glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv");
1500
        glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv");
1501
        glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s");
1502
        glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv");
1503
        glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv");
1504
        glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv");
1505
        glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv");
1506
        glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer");
1507
}
1508
static void load_GL_ARB_buffer_storage(GLADloadproc load) {
1509
        if(!GLAD_GL_ARB_buffer_storage) return;
1510
        glad_glBufferStorage = (PFNGLBUFFERSTORAGEPROC)load("glBufferStorage");
1511
}
7752 pogokeen 1512
static void load_GL_ARB_clip_control(GLADloadproc load) {
1513
        if(!GLAD_GL_ARB_clip_control) return;
1514
        glad_glClipControl = (PFNGLCLIPCONTROLPROC)load("glClipControl");
1515
}
6656 pogokeen 1516
static void load_GL_ARB_debug_output(GLADloadproc load) {
1517
        if(!GLAD_GL_ARB_debug_output) return;
1518
        glad_glDebugMessageControlARB = (PFNGLDEBUGMESSAGECONTROLARBPROC)load("glDebugMessageControlARB");
1519
        glad_glDebugMessageInsertARB = (PFNGLDEBUGMESSAGEINSERTARBPROC)load("glDebugMessageInsertARB");
1520
        glad_glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC)load("glDebugMessageCallbackARB");
1521
        glad_glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC)load("glGetDebugMessageLogARB");
1522
}
1523
static void load_GL_ARB_map_buffer_range(GLADloadproc load) {
1524
        if(!GLAD_GL_ARB_map_buffer_range) return;
1525
        glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange");
1526
        glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange");
1527
}
6661 pogokeen 1528
static void load_GL_ARB_sync(GLADloadproc load) {
1529
        if(!GLAD_GL_ARB_sync) return;
1530
        glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync");
1531
        glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync");
1532
        glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync");
1533
        glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync");
1534
        glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync");
1535
        glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v");
1536
        glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv");
1537
}
6656 pogokeen 1538
static void load_GL_EXT_fog_coord(GLADloadproc load) {
1539
        if(!GLAD_GL_EXT_fog_coord) return;
1540
        glad_glFogCoordfEXT = (PFNGLFOGCOORDFEXTPROC)load("glFogCoordfEXT");
1541
        glad_glFogCoordfvEXT = (PFNGLFOGCOORDFVEXTPROC)load("glFogCoordfvEXT");
1542
        glad_glFogCoorddEXT = (PFNGLFOGCOORDDEXTPROC)load("glFogCoorddEXT");
1543
        glad_glFogCoorddvEXT = (PFNGLFOGCOORDDVEXTPROC)load("glFogCoorddvEXT");
1544
        glad_glFogCoordPointerEXT = (PFNGLFOGCOORDPOINTEREXTPROC)load("glFogCoordPointerEXT");
1545
}
1546
static void load_GL_EXT_framebuffer_object(GLADloadproc load) {
1547
        if(!GLAD_GL_EXT_framebuffer_object) return;
1548
        glad_glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)load("glIsRenderbufferEXT");
1549
        glad_glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)load("glBindRenderbufferEXT");
1550
        glad_glDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC)load("glDeleteRenderbuffersEXT");
1551
        glad_glGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)load("glGenRenderbuffersEXT");
1552
        glad_glRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC)load("glRenderbufferStorageEXT");
1553
        glad_glGetRenderbufferParameterivEXT = (PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC)load("glGetRenderbufferParameterivEXT");
1554
        glad_glIsFramebufferEXT = (PFNGLISFRAMEBUFFEREXTPROC)load("glIsFramebufferEXT");
1555
        glad_glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)load("glBindFramebufferEXT");
1556
        glad_glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)load("glDeleteFramebuffersEXT");
1557
        glad_glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)load("glGenFramebuffersEXT");
1558
        glad_glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)load("glCheckFramebufferStatusEXT");
1559
        glad_glFramebufferTexture1DEXT = (PFNGLFRAMEBUFFERTEXTURE1DEXTPROC)load("glFramebufferTexture1DEXT");
1560
        glad_glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)load("glFramebufferTexture2DEXT");
1561
        glad_glFramebufferTexture3DEXT = (PFNGLFRAMEBUFFERTEXTURE3DEXTPROC)load("glFramebufferTexture3DEXT");
1562
        glad_glFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)load("glFramebufferRenderbufferEXT");
1563
        glad_glGetFramebufferAttachmentParameterivEXT = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)load("glGetFramebufferAttachmentParameterivEXT");
1564
        glad_glGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC)load("glGenerateMipmapEXT");
1565
}
1566
static void load_GL_SGIS_fog_function(GLADloadproc load) {
1567
        if(!GLAD_GL_SGIS_fog_function) return;
1568
        glad_glFogFuncSGIS = (PFNGLFOGFUNCSGISPROC)load("glFogFuncSGIS");
1569
        glad_glGetFogFuncSGIS = (PFNGLGETFOGFUNCSGISPROC)load("glGetFogFuncSGIS");
1570
}
1571
static int find_extensionsGL(void) {
1572
        if (!get_exts()) return 0;
1573
        GLAD_GL_ARB_buffer_storage = has_ext("GL_ARB_buffer_storage");
7752 pogokeen 1574
        GLAD_GL_ARB_clip_control = has_ext("GL_ARB_clip_control");
6656 pogokeen 1575
        GLAD_GL_ARB_debug_output = has_ext("GL_ARB_debug_output");
7752 pogokeen 1576
        GLAD_GL_ARB_depth_clamp = has_ext("GL_ARB_depth_clamp");
6656 pogokeen 1577
        GLAD_GL_ARB_map_buffer_range = has_ext("GL_ARB_map_buffer_range");
7752 pogokeen 1578
        GLAD_GL_ARB_shader_texture_lod = has_ext("GL_ARB_shader_texture_lod");
6661 pogokeen 1579
        GLAD_GL_ARB_sync = has_ext("GL_ARB_sync");
6656 pogokeen 1580
        GLAD_GL_ARB_texture_rectangle = has_ext("GL_ARB_texture_rectangle");
1581
        GLAD_GL_EXT_fog_coord = has_ext("GL_EXT_fog_coord");
1582
        GLAD_GL_EXT_framebuffer_object = has_ext("GL_EXT_framebuffer_object");
1583
        GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc");
1584
        GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic");
1585
        GLAD_GL_NV_fog_distance = has_ext("GL_NV_fog_distance");
1586
        GLAD_GL_NV_multisample_filter_hint = has_ext("GL_NV_multisample_filter_hint");
1587
        GLAD_GL_SGIS_fog_function = has_ext("GL_SGIS_fog_function");
1588
        GLAD_GL_SGIX_fog_offset = has_ext("GL_SGIX_fog_offset");
1589
        free_exts();
1590
        return 1;
1591
}
1592
 
1593
static void find_coreGL(void) {
1594
 
1595
    /* Thank you @elmindreda
1596
     * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
1597
     * https://github.com/glfw/glfw/blob/master/src/context.c#L36
1598
     */
1599
    int i, major, minor;
1600
 
1601
    const char* version;
1602
    const char* prefixes[] = {
1603
        "OpenGL ES-CM ",
1604
        "OpenGL ES-CL ",
1605
        "OpenGL ES ",
1606
        NULL
1607
    };
1608
 
1609
    version = (const char*) glGetString(GL_VERSION);
1610
    if (!version) return;
1611
 
1612
    for (i = 0;  prefixes[i];  i++) {
1613
        const size_t length = strlen(prefixes[i]);
1614
        if (strncmp(version, prefixes[i], length) == 0) {
1615
            version += length;
1616
            break;
1617
        }
1618
    }
1619
 
1620
/* PR #18 */
1621
#ifdef _MSC_VER
1622
    sscanf_s(version, "%d.%d", &major, &minor);
1623
#else
1624
    sscanf(version, "%d.%d", &major, &minor);
1625
#endif
1626
 
1627
    GLVersion.major = major; GLVersion.minor = minor;
1628
    max_loaded_major = major; max_loaded_minor = minor;
1629
        GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
1630
        GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
1631
        GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
1632
        GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
1633
        GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
1634
        GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;
1635
        GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
1636
        if (GLVersion.major > 2 || (GLVersion.major >= 2 && GLVersion.minor >= 0)) {
1637
                max_loaded_major = 2;
1638
                max_loaded_minor = 0;
1639
        }
1640
}
1641
 
1642
int gladLoadGLLoader(GLADloadproc load) {
1643
        GLVersion.major = 0; GLVersion.minor = 0;
1644
        glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
1645
        if(glGetString == NULL) return 0;
1646
        if(glGetString(GL_VERSION) == NULL) return 0;
1647
        find_coreGL();
1648
        load_GL_VERSION_1_0(load);
1649
        load_GL_VERSION_1_1(load);
1650
        load_GL_VERSION_1_2(load);
1651
        load_GL_VERSION_1_3(load);
1652
        load_GL_VERSION_1_4(load);
1653
        load_GL_VERSION_1_5(load);
1654
        load_GL_VERSION_2_0(load);
1655
 
1656
        if (!find_extensionsGL()) return 0;
1657
        load_GL_ARB_buffer_storage(load);
7752 pogokeen 1658
        load_GL_ARB_clip_control(load);
6656 pogokeen 1659
        load_GL_ARB_debug_output(load);
1660
        load_GL_ARB_map_buffer_range(load);
6661 pogokeen 1661
        load_GL_ARB_sync(load);
6656 pogokeen 1662
        load_GL_EXT_fog_coord(load);
1663
        load_GL_EXT_framebuffer_object(load);
1664
        load_GL_SGIS_fog_function(load);
1665
        return GLVersion.major != 0 || GLVersion.minor != 0;
1666
}
1667
 
1668
static void load_GL_ES_VERSION_2_0(GLADloadproc load) {
1669
        if(!GLAD_GL_ES_VERSION_2_0) return;
1670
        glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
1671
        glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader");
1672
        glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation");
1673
        glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer");
1674
        glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer");
1675
        glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer");
1676
        glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
1677
        glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor");
1678
        glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation");
1679
        glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate");
1680
        glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
1681
        glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate");
1682
        glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData");
1683
        glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData");
1684
        glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus");
1685
        glad_glClear = (PFNGLCLEARPROC)load("glClear");
1686
        glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
1687
        glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC)load("glClearDepthf");
1688
        glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
1689
        glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
1690
        glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader");
1691
        glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
1692
        glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
1693
        glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
1694
        glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
1695
        glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram");
1696
        glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader");
1697
        glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
1698
        glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers");
1699
        glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers");
1700
        glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram");
1701
        glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers");
1702
        glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader");
1703
        glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
1704
        glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
1705
        glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
1706
        glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC)load("glDepthRangef");
1707
        glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader");
1708
        glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
1709
        glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray");
1710
        glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
1711
        glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
1712
        glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
1713
        glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray");
1714
        glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
1715
        glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
1716
        glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer");
1717
        glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D");
1718
        glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
1719
        glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers");
1720
        glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap");
1721
        glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers");
1722
        glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers");
1723
        glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
1724
        glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib");
1725
        glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform");
1726
        glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders");
1727
        glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation");
1728
        glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
1729
        glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv");
1730
        glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
1731
        glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
1732
        glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv");
1733
        glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
1734
        glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv");
1735
        glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog");
1736
        glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv");
1737
        glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv");
1738
        glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog");
1739
        glad_glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)load("glGetShaderPrecisionFormat");
1740
        glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource");
1741
        glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
1742
        glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
1743
        glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
1744
        glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv");
1745
        glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv");
1746
        glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation");
1747
        glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv");
1748
        glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv");
1749
        glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv");
1750
        glad_glHint = (PFNGLHINTPROC)load("glHint");
1751
        glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer");
1752
        glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
1753
        glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer");
1754
        glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram");
1755
        glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer");
1756
        glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader");
1757
        glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
1758
        glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
1759
        glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram");
1760
        glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
1761
        glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
1762
        glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
1763
        glad_glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)load("glReleaseShaderCompiler");
1764
        glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage");
1765
        glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
1766
        glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
1767
        glad_glShaderBinary = (PFNGLSHADERBINARYPROC)load("glShaderBinary");
1768
        glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource");
1769
        glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
1770
        glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate");
1771
        glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
1772
        glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate");
1773
        glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
1774
        glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate");
1775
        glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
1776
        glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
1777
        glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
1778
        glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
1779
        glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
1780
        glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
1781
        glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f");
1782
        glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv");
1783
        glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i");
1784
        glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv");
1785
        glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f");
1786
        glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv");
1787
        glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i");
1788
        glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv");
1789
        glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f");
1790
        glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv");
1791
        glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i");
1792
        glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv");
1793
        glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f");
1794
        glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv");
1795
        glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i");
1796
        glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv");
1797
        glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv");
1798
        glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv");
1799
        glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv");
1800
        glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram");
1801
        glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram");
1802
        glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f");
1803
        glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv");
1804
        glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f");
1805
        glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv");
1806
        glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f");
1807
        glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv");
1808
        glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f");
1809
        glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv");
1810
        glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer");
1811
        glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
1812
}
1813
static int find_extensionsGLES2(void) {
1814
        if (!get_exts()) return 0;
1815
        GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc");
1816
        GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic");
1817
        free_exts();
1818
        return 1;
1819
}
1820
 
1821
static void find_coreGLES2(void) {
1822
 
1823
    /* Thank you @elmindreda
1824
     * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
1825
     * https://github.com/glfw/glfw/blob/master/src/context.c#L36
1826
     */
1827
    int i, major, minor;
1828
 
1829
    const char* version;
1830
    const char* prefixes[] = {
1831
        "OpenGL ES-CM ",
1832
        "OpenGL ES-CL ",
1833
        "OpenGL ES ",
1834
        NULL
1835
    };
1836
 
1837
    version = (const char*) glGetString(GL_VERSION);
1838
    if (!version) return;
1839
 
1840
    for (i = 0;  prefixes[i];  i++) {
1841
        const size_t length = strlen(prefixes[i]);
1842
        if (strncmp(version, prefixes[i], length) == 0) {
1843
            version += length;
1844
            break;
1845
        }
1846
    }
1847
 
1848
/* PR #18 */
1849
#ifdef _MSC_VER
1850
    sscanf_s(version, "%d.%d", &major, &minor);
1851
#else
1852
    sscanf(version, "%d.%d", &major, &minor);
1853
#endif
1854
 
1855
    GLVersion.major = major; GLVersion.minor = minor;
1856
    max_loaded_major = major; max_loaded_minor = minor;
1857
        GLAD_GL_ES_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
1858
        if (GLVersion.major > 2 || (GLVersion.major >= 2 && GLVersion.minor >= 0)) {
1859
                max_loaded_major = 2;
1860
                max_loaded_minor = 0;
1861
        }
1862
}
1863
 
1864
int gladLoadGLES2Loader(GLADloadproc load) {
1865
        GLVersion.major = 0; GLVersion.minor = 0;
1866
        glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
1867
        if(glGetString == NULL) return 0;
1868
        if(glGetString(GL_VERSION) == NULL) return 0;
1869
        find_coreGLES2();
1870
        load_GL_ES_VERSION_2_0(load);
1871
 
1872
        if (!find_extensionsGLES2()) return 0;
1873
        return GLVersion.major != 0 || GLVersion.minor != 0;
1874
}
1875
 
1876
static void load_GL_VERSION_ES_CM_1_0(GLADloadproc load) {
1877
        if(!GLAD_GL_VERSION_ES_CM_1_0) return;
1878
        glad_glAlphaFunc = (PFNGLALPHAFUNCPROC)load("glAlphaFunc");
1879
        glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
1880
        glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC)load("glClearDepthf");
1881
        glad_glClipPlanef = (PFNGLCLIPPLANEFPROC)load("glClipPlanef");
1882
        glad_glColor4f = (PFNGLCOLOR4FPROC)load("glColor4f");
1883
        glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC)load("glDepthRangef");
1884
        glad_glFogf = (PFNGLFOGFPROC)load("glFogf");
1885
        glad_glFogfv = (PFNGLFOGFVPROC)load("glFogfv");
1886
        glad_glFrustumf = (PFNGLFRUSTUMFPROC)load("glFrustumf");
1887
        glad_glGetClipPlanef = (PFNGLGETCLIPPLANEFPROC)load("glGetClipPlanef");
1888
        glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
1889
        glad_glGetLightfv = (PFNGLGETLIGHTFVPROC)load("glGetLightfv");
1890
        glad_glGetMaterialfv = (PFNGLGETMATERIALFVPROC)load("glGetMaterialfv");
1891
        glad_glGetTexEnvfv = (PFNGLGETTEXENVFVPROC)load("glGetTexEnvfv");
1892
        glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
1893
        glad_glLightModelf = (PFNGLLIGHTMODELFPROC)load("glLightModelf");
1894
        glad_glLightModelfv = (PFNGLLIGHTMODELFVPROC)load("glLightModelfv");
1895
        glad_glLightf = (PFNGLLIGHTFPROC)load("glLightf");
1896
        glad_glLightfv = (PFNGLLIGHTFVPROC)load("glLightfv");
1897
        glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
1898
        glad_glLoadMatrixf = (PFNGLLOADMATRIXFPROC)load("glLoadMatrixf");
1899
        glad_glMaterialf = (PFNGLMATERIALFPROC)load("glMaterialf");
1900
        glad_glMaterialfv = (PFNGLMATERIALFVPROC)load("glMaterialfv");
1901
        glad_glMultMatrixf = (PFNGLMULTMATRIXFPROC)load("glMultMatrixf");
1902
        glad_glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)load("glMultiTexCoord4f");
1903
        glad_glNormal3f = (PFNGLNORMAL3FPROC)load("glNormal3f");
1904
        glad_glOrthof = (PFNGLORTHOFPROC)load("glOrthof");
1905
        glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf");
1906
        glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv");
1907
        glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize");
1908
        glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
1909
        glad_glRotatef = (PFNGLROTATEFPROC)load("glRotatef");
1910
        glad_glScalef = (PFNGLSCALEFPROC)load("glScalef");
1911
        glad_glTexEnvf = (PFNGLTEXENVFPROC)load("glTexEnvf");
1912
        glad_glTexEnvfv = (PFNGLTEXENVFVPROC)load("glTexEnvfv");
1913
        glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
1914
        glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
1915
        glad_glTranslatef = (PFNGLTRANSLATEFPROC)load("glTranslatef");
1916
        glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
1917
        glad_glAlphaFuncx = (PFNGLALPHAFUNCXPROC)load("glAlphaFuncx");
1918
        glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer");
1919
        glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
1920
        glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
1921
        glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData");
1922
        glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData");
1923
        glad_glClear = (PFNGLCLEARPROC)load("glClear");
1924
        glad_glClearColorx = (PFNGLCLEARCOLORXPROC)load("glClearColorx");
1925
        glad_glClearDepthx = (PFNGLCLEARDEPTHXPROC)load("glClearDepthx");
1926
        glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
1927
        glad_glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)load("glClientActiveTexture");
1928
        glad_glClipPlanex = (PFNGLCLIPPLANEXPROC)load("glClipPlanex");
1929
        glad_glColor4ub = (PFNGLCOLOR4UBPROC)load("glColor4ub");
1930
        glad_glColor4x = (PFNGLCOLOR4XPROC)load("glColor4x");
1931
        glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
1932
        glad_glColorPointer = (PFNGLCOLORPOINTERPROC)load("glColorPointer");
1933
        glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
1934
        glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
1935
        glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
1936
        glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
1937
        glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
1938
        glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers");
1939
        glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
1940
        glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
1941
        glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
1942
        glad_glDepthRangex = (PFNGLDEPTHRANGEXPROC)load("glDepthRangex");
1943
        glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
1944
        glad_glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC)load("glDisableClientState");
1945
        glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
1946
        glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
1947
        glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
1948
        glad_glEnableClientState = (PFNGLENABLECLIENTSTATEPROC)load("glEnableClientState");
1949
        glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
1950
        glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
1951
        glad_glFogx = (PFNGLFOGXPROC)load("glFogx");
1952
        glad_glFogxv = (PFNGLFOGXVPROC)load("glFogxv");
1953
        glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
1954
        glad_glFrustumx = (PFNGLFRUSTUMXPROC)load("glFrustumx");
1955
        glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
1956
        glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv");
1957
        glad_glGetClipPlanex = (PFNGLGETCLIPPLANEXPROC)load("glGetClipPlanex");
1958
        glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers");
1959
        glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
1960
        glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
1961
        glad_glGetFixedv = (PFNGLGETFIXEDVPROC)load("glGetFixedv");
1962
        glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
1963
        glad_glGetLightxv = (PFNGLGETLIGHTXVPROC)load("glGetLightxv");
1964
        glad_glGetMaterialxv = (PFNGLGETMATERIALXVPROC)load("glGetMaterialxv");
1965
        glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv");
1966
        glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
1967
        glad_glGetTexEnviv = (PFNGLGETTEXENVIVPROC)load("glGetTexEnviv");
1968
        glad_glGetTexEnvxv = (PFNGLGETTEXENVXVPROC)load("glGetTexEnvxv");
1969
        glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
1970
        glad_glGetTexParameterxv = (PFNGLGETTEXPARAMETERXVPROC)load("glGetTexParameterxv");
1971
        glad_glHint = (PFNGLHINTPROC)load("glHint");
1972
        glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer");
1973
        glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
1974
        glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
1975
        glad_glLightModelx = (PFNGLLIGHTMODELXPROC)load("glLightModelx");
1976
        glad_glLightModelxv = (PFNGLLIGHTMODELXVPROC)load("glLightModelxv");
1977
        glad_glLightx = (PFNGLLIGHTXPROC)load("glLightx");
1978
        glad_glLightxv = (PFNGLLIGHTXVPROC)load("glLightxv");
1979
        glad_glLineWidthx = (PFNGLLINEWIDTHXPROC)load("glLineWidthx");
1980
        glad_glLoadIdentity = (PFNGLLOADIDENTITYPROC)load("glLoadIdentity");
1981
        glad_glLoadMatrixx = (PFNGLLOADMATRIXXPROC)load("glLoadMatrixx");
1982
        glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp");
1983
        glad_glMaterialx = (PFNGLMATERIALXPROC)load("glMaterialx");
1984
        glad_glMaterialxv = (PFNGLMATERIALXVPROC)load("glMaterialxv");
1985
        glad_glMatrixMode = (PFNGLMATRIXMODEPROC)load("glMatrixMode");
1986
        glad_glMultMatrixx = (PFNGLMULTMATRIXXPROC)load("glMultMatrixx");
1987
        glad_glMultiTexCoord4x = (PFNGLMULTITEXCOORD4XPROC)load("glMultiTexCoord4x");
1988
        glad_glNormal3x = (PFNGLNORMAL3XPROC)load("glNormal3x");
1989
        glad_glNormalPointer = (PFNGLNORMALPOINTERPROC)load("glNormalPointer");
1990
        glad_glOrthox = (PFNGLORTHOXPROC)load("glOrthox");
1991
        glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
1992
        glad_glPointParameterx = (PFNGLPOINTPARAMETERXPROC)load("glPointParameterx");
1993
        glad_glPointParameterxv = (PFNGLPOINTPARAMETERXVPROC)load("glPointParameterxv");
1994
        glad_glPointSizex = (PFNGLPOINTSIZEXPROC)load("glPointSizex");
1995
        glad_glPolygonOffsetx = (PFNGLPOLYGONOFFSETXPROC)load("glPolygonOffsetx");
1996
        glad_glPopMatrix = (PFNGLPOPMATRIXPROC)load("glPopMatrix");
1997
        glad_glPushMatrix = (PFNGLPUSHMATRIXPROC)load("glPushMatrix");
1998
        glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
1999
        glad_glRotatex = (PFNGLROTATEXPROC)load("glRotatex");
2000
        glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
2001
        glad_glSampleCoveragex = (PFNGLSAMPLECOVERAGEXPROC)load("glSampleCoveragex");
2002
        glad_glScalex = (PFNGLSCALEXPROC)load("glScalex");
2003
        glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
2004
        glad_glShadeModel = (PFNGLSHADEMODELPROC)load("glShadeModel");
2005
        glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
2006
        glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
2007
        glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
2008
        glad_glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC)load("glTexCoordPointer");
2009
        glad_glTexEnvi = (PFNGLTEXENVIPROC)load("glTexEnvi");
2010
        glad_glTexEnvx = (PFNGLTEXENVXPROC)load("glTexEnvx");
2011
        glad_glTexEnviv = (PFNGLTEXENVIVPROC)load("glTexEnviv");
2012
        glad_glTexEnvxv = (PFNGLTEXENVXVPROC)load("glTexEnvxv");
2013
        glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
2014
        glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
2015
        glad_glTexParameterx = (PFNGLTEXPARAMETERXPROC)load("glTexParameterx");
2016
        glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
2017
        glad_glTexParameterxv = (PFNGLTEXPARAMETERXVPROC)load("glTexParameterxv");
2018
        glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
2019
        glad_glTranslatex = (PFNGLTRANSLATEXPROC)load("glTranslatex");
2020
        glad_glVertexPointer = (PFNGLVERTEXPOINTERPROC)load("glVertexPointer");
2021
        glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
2022
}
2023
static int find_extensionsGLES1(void) {
2024
        if (!get_exts()) return 0;
2025
        GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic");
2026
        free_exts();
2027
        return 1;
2028
}
2029
 
2030
static void find_coreGLES1(void) {
2031
 
2032
    /* Thank you @elmindreda
2033
     * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
2034
     * https://github.com/glfw/glfw/blob/master/src/context.c#L36
2035
     */
2036
    int i, major, minor;
2037
 
2038
    const char* version;
2039
    const char* prefixes[] = {
2040
        "OpenGL ES-CM ",
2041
        "OpenGL ES-CL ",
2042
        "OpenGL ES ",
2043
        NULL
2044
    };
2045
 
2046
    version = (const char*) glGetString(GL_VERSION);
2047
    if (!version) return;
2048
 
2049
    for (i = 0;  prefixes[i];  i++) {
2050
        const size_t length = strlen(prefixes[i]);
2051
        if (strncmp(version, prefixes[i], length) == 0) {
2052
            version += length;
2053
            break;
2054
        }
2055
    }
2056
 
2057
/* PR #18 */
2058
#ifdef _MSC_VER
2059
    sscanf_s(version, "%d.%d", &major, &minor);
2060
#else
2061
    sscanf(version, "%d.%d", &major, &minor);
2062
#endif
2063
 
2064
    GLVersion.major = major; GLVersion.minor = minor;
2065
    max_loaded_major = major; max_loaded_minor = minor;
2066
        GLAD_GL_VERSION_ES_CM_1_0 = (major == 1 && minor >= 0) || major > 1;
2067
        if (GLVersion.major > 1 || (GLVersion.major >= 1 && GLVersion.minor >= 0)) {
2068
                max_loaded_major = 1;
2069
                max_loaded_minor = 0;
2070
        }
2071
}
2072
 
2073
int gladLoadGLES1Loader(GLADloadproc load) {
2074
        GLVersion.major = 0; GLVersion.minor = 0;
2075
        glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
2076
        if(glGetString == NULL) return 0;
2077
        if(glGetString(GL_VERSION) == NULL) return 0;
2078
        find_coreGLES1();
2079
        load_GL_VERSION_ES_CM_1_0(load);
2080
 
2081
        if (!find_extensionsGLES1()) return 0;
2082
        return GLVersion.major != 0 || GLVersion.minor != 0;
2083
}
2084