0030638: Visualization, TKOpenGl - load OpenGL 4.5 functions within OpenGl_Context
[occt.git] / src / OpenGl / OpenGl_GlFunctions.hxx
1 // Created on: 2014-03-17
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _OpenGl_GlFunctions_Header
17 #define _OpenGl_GlFunctions_Header
18
19 // required for correct APIENTRY definition
20 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
21   #define WIN32_LEAN_AND_MEAN
22   #include <windows.h>
23 #endif
24
25 #include <Standard_Macro.hxx>
26 #include <Standard_TypeDef.hxx>
27
28 #ifndef APIENTRY
29   #define APIENTRY
30 #endif
31 #ifndef APIENTRYP
32   #define APIENTRYP APIENTRY *
33 #endif
34 #ifndef GLAPI
35   #define GLAPI extern
36 #endif
37
38 // exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion
39 #ifndef GL_GLEXT_LEGACY
40   #define GL_GLEXT_LEGACY
41 #endif
42 #ifndef GLX_GLXEXT_LEGACY
43   #define GLX_GLXEXT_LEGACY
44 #endif
45
46 // include main OpenGL header provided with system
47 #if defined(__APPLE__)
48   #import <TargetConditionals.h>
49   #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
50     #include <OpenGLES/ES2/gl.h>
51   #else
52     #include <OpenGL/gl.h>
53   #endif
54   #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
55 #elif defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__)
56   #if defined(_WIN32)
57     // Angle OpenGL ES headers do not define function prototypes even for core functions,
58     // however OCCT is expected to be linked against libGLESv2
59     #define GL_GLEXT_PROTOTYPES
60   #endif
61   #include <GLES2/gl2.h>
62   //#include <GLES3/gl3.h>
63 #else
64   #include <GL/gl.h>
65 #endif
66
67 #if defined(GL_ES_VERSION_2_0)
68   // define items to unify code paths with desktop OpenGL
69   typedef double GLdouble;
70   typedef double GLclampd;
71   typedef uint64_t GLuint64;
72   #define GL_NONE 0
73
74   // OpenGL ES 3.0+ or GL_OES_element_index_uint extension
75   #define GL_UNSIGNED_INT 0x1405
76
77   // OpenGL ES 3.1+
78   #define GL_TEXTURE_2D_MULTISAMPLE 0x9100
79   #define GL_MAX_SAMPLES  0x8D57
80
81   // OpenGL ES 3.2+ or GL_EXT_texture_buffer for OpenGL ES 3.1+
82   #define GL_TEXTURE_BUFFER 0x8C2A
83
84   // in core since OpenGL ES 3.0, extension GL_EXT_texture_rg
85   #define GL_RED   0x1903
86   #define GL_R8    0x8229
87   // in core since OpenGL ES 3.0, extension GL_OES_rgb8_rgba8
88   #define GL_RGB8  0x8051
89   #define GL_RGBA8 0x8058
90   #define GL_LUMINANCE8 0x8040
91   // GL_EXT_texture_format_BGRA8888
92   #define GL_BGRA_EXT 0x80E1 // same as GL_BGRA on desktop
93
94   #define GL_R16      0x822A
95   #define GL_R16F     0x822D
96   #define GL_R32F     0x822E
97   #define GL_RGB16F   0x881B
98   #define GL_RGBA32F  0x8814
99   #define GL_RGB32F   0x8815
100   #define GL_RGBA16F  0x881A
101   #define GL_RGB16F   0x881B
102   #define GL_RGB4     0x804F
103   #define GL_RGB5     0x8050
104   #define GL_RGB8     0x8051
105   #define GL_RGB10    0x8052
106   #define GL_RGB12    0x8053
107   #define GL_RGB16    0x8054
108   #define GL_RGBA8    0x8058
109   #define GL_RGB10_A2 0x8059
110   #define GL_RGBA12   0x805A
111   #define GL_RGBA16   0x805B
112   #define GL_ALPHA8   0x803C
113   #define GL_ALPHA16  0x803E
114
115   #define GL_RG          0x8227
116   #define GL_RG8         0x822B
117   #define GL_RG16        0x822C
118   #define GL_RG16F       0x822F
119   #define GL_RG32F       0x8230
120   #define GL_RG_INTEGER  0x8228
121   #define GL_RED_INTEGER 0x8D94
122
123   #define GL_R8I      0x8231
124   #define GL_R8UI     0x8232
125   #define GL_R16I     0x8233
126   #define GL_R16UI    0x8234
127   #define GL_R32I     0x8235
128   #define GL_R32UI    0x8236
129   #define GL_RG8I     0x8237
130   #define GL_RG8UI    0x8238
131   #define GL_RG16I    0x8239
132   #define GL_RG16UI   0x823A
133   #define GL_RG32I    0x823B
134   #define GL_RG32UI   0x823C
135   #define GL_RG8_SNORM 0x8F95
136   #define GL_RGBA32UI 0x8D70
137   #define GL_RGB32UI  0x8D71
138   #define GL_RGBA16UI 0x8D76
139   #define GL_RGB16UI  0x8D77
140   #define GL_RGBA8UI  0x8D7C
141   #define GL_RGB8UI   0x8D7D
142   #define GL_RGBA32I  0x8D82
143   #define GL_RGB32I   0x8D83
144   #define GL_RGBA16I  0x8D88
145   #define GL_RGB16I   0x8D89
146   #define GL_RGBA8I   0x8D8E
147   #define GL_RGB8I    0x8D8F
148
149   // GL_OES_packed_depth_stencil
150   #define GL_DEPTH_STENCIL                  0x84F9
151   #define GL_UNSIGNED_INT_24_8              0x84FA
152   #define GL_DEPTH24_STENCIL8               0x88F0
153
154   // OpenGL ES 3.0+
155   #define GL_DEPTH_COMPONENT24              0x81A6
156   #define GL_DEPTH_COMPONENT32F             0x8CAC
157   #define GL_DEPTH32F_STENCIL8              0x8CAD
158   #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
159
160   #define GL_READ_FRAMEBUFFER               0x8CA8
161   #define GL_DRAW_FRAMEBUFFER               0x8CA9
162
163   #define GL_TEXTURE_3D                     0x806F
164   #define GL_TEXTURE_WRAP_R                 0x8072
165
166   // GL_EXT_texture_filter_anisotropic
167   #define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE
168   #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
169
170   // debug ARB extension
171   #define GL_DEBUG_OUTPUT               0x92E0
172   #define GL_DEBUG_OUTPUT_SYNCHRONOUS   0x8242
173   #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
174   #define GL_DEBUG_CALLBACK_FUNCTION    0x8244
175   #define GL_DEBUG_CALLBACK_USER_PARAM  0x8245
176   #define GL_DEBUG_SOURCE_API           0x8246
177   #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
178   #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
179   #define GL_DEBUG_SOURCE_THIRD_PARTY   0x8249
180   #define GL_DEBUG_SOURCE_APPLICATION   0x824A
181   #define GL_DEBUG_SOURCE_OTHER         0x824B
182   #define GL_DEBUG_TYPE_ERROR           0x824C
183   #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
184   #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR  0x824E
185   #define GL_DEBUG_TYPE_PORTABILITY     0x824F
186   #define GL_DEBUG_TYPE_PERFORMANCE     0x8250
187   #define GL_DEBUG_TYPE_OTHER           0x8251
188   #define GL_MAX_DEBUG_MESSAGE_LENGTH   0x9143
189   #define GL_MAX_DEBUG_LOGGED_MESSAGES  0x9144
190   #define GL_DEBUG_LOGGED_MESSAGES      0x9145
191   #define GL_DEBUG_SEVERITY_HIGH        0x9146
192   #define GL_DEBUG_SEVERITY_MEDIUM      0x9147
193   #define GL_DEBUG_SEVERITY_LOW         0x9148
194
195   // GL_ARB_draw_buffers (GL_EXT_draw_buffers) extension
196   #define GL_MAX_COLOR_ATTACHMENTS      0x8CDF
197   #define GL_MAX_DRAW_BUFFERS           0x8824
198
199   // OpenGL ES 3.0+ or OES_texture_half_float
200   #define GL_HALF_FLOAT                 0x140B
201   #define GL_HALF_FLOAT_OES             0x8D61
202
203   // OpenGL ES 3.1+
204   #define GL_COMPUTE_SHADER             0x91B9
205
206   // OpenGL ES 3.2+
207   #define GL_GEOMETRY_SHADER            0x8DD9
208   #define GL_TESS_CONTROL_SHADER        0x8E88
209   #define GL_TESS_EVALUATION_SHADER     0x8E87
210   #define GL_LINES_ADJACENCY            0x000A
211   #define GL_LINE_STRIP_ADJACENCY       0x000B
212   #define GL_TRIANGLES_ADJACENCY        0x000C
213   #define GL_TRIANGLE_STRIP_ADJACENCY   0x000D
214   #define GL_PATCHES                    0x000E
215 #endif
216
217 #if !defined(HAVE_EGL) && (defined(__ANDROID__) || defined(__QNX__) || defined(HAVE_GLES2) || defined(OCCT_UWP))
218   #define HAVE_EGL
219 #endif
220
221 #include <InterfaceGraphic.hxx>
222
223 // GL version can be defined by system gl.h header
224 #if !defined(GL_ES_VERSION_2_0)
225   #undef GL_VERSION_1_2
226   #undef GL_VERSION_1_3
227   #undef GL_VERSION_1_4
228   #undef GL_VERSION_1_5
229   #undef GL_VERSION_2_0
230   #undef GL_VERSION_2_1
231   #undef GL_VERSION_3_0
232   #undef GL_VERSION_3_1
233   #undef GL_VERSION_3_2
234   #undef GL_VERSION_3_3
235   #undef GL_VERSION_4_0
236   #undef GL_VERSION_4_1
237   #undef GL_VERSION_4_2
238   #undef GL_VERSION_4_3
239   #undef GL_VERSION_4_4
240   #undef GL_VERSION_4_5
241
242   // include glext.h provided by Khronos group
243   #include <glext.h>
244 #endif
245
246 //! Mega structure defines the complete list of OpenGL functions.
247 struct OpenGl_GlFunctions
248 {
249
250 public: //! @name OpenGL ES 1.1
251
252 #if defined(GL_ES_VERSION_2_0)
253
254   inline void glActiveTexture (GLenum texture)
255   {
256     ::glActiveTexture (texture);
257   }
258
259   inline void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
260   {
261     ::glCompressedTexImage2D (target, level, internalformat, width, height, border, imageSize, data);
262   }
263
264   inline void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
265   {
266     ::glCompressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, imageSize, data);
267   }
268
269   inline void glBindBuffer (GLenum target, GLuint buffer)
270   {
271     ::glBindBuffer (target, buffer);
272   }
273
274   inline void glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage)
275   {
276     ::glBufferData (target, size, data, usage);
277   }
278
279   inline void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
280   {
281     ::glBufferSubData (target, offset, size, data);
282   }
283
284   inline void glDeleteBuffers (GLsizei n, const GLuint *buffers)
285   {
286     ::glDeleteBuffers (n, buffers);
287   }
288
289   inline void glDeleteTextures (GLsizei n, const GLuint *textures)
290   {
291     ::glDeleteTextures (n, textures);
292   }
293
294   inline void glDepthFunc (GLenum func)
295   {
296     ::glDepthFunc (func);
297   }
298
299   inline void glDepthMask (GLboolean flag)
300   {
301     ::glDepthMask (flag);
302   }
303
304   inline void glDepthRangef (GLfloat n, GLfloat f)
305   {
306     ::glDepthRangef (n, f);
307   }
308
309   inline void glGenBuffers (GLsizei n, GLuint *buffers)
310   {
311     ::glGenBuffers (n, buffers);
312   }
313
314   inline void glGenTextures (GLsizei n, GLuint *textures)
315   {
316     ::glGenTextures (n, textures);
317   }
318
319   inline void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
320   {
321     ::glGetBufferParameteriv (target, pname, params);
322   }
323
324   inline GLboolean glIsBuffer (GLuint buffer)
325   {
326     return ::glIsBuffer (buffer);
327   }
328
329   inline void glSampleCoverage (GLfloat value, GLboolean invert)
330   {
331     ::glSampleCoverage (value, invert);
332   }
333
334   inline void glMultiDrawElements (GLenum theMode, const GLsizei* theCount, GLenum theType, const void* const* theIndices, GLsizei theDrawCount)
335   {
336     if (theCount   == NULL
337      || theIndices == NULL)
338     {
339       return;
340     }
341
342     for (GLsizei aBatchIter = 0; aBatchIter < theDrawCount; ++aBatchIter)
343     {
344       ::glDrawElements (theMode, theCount[aBatchIter], theType, theIndices[aBatchIter]);
345     }
346   }
347
348 #endif
349
350 public: //! @name OpenGL ES 2.0
351
352 #if defined(GL_ES_VERSION_2_0)
353   inline void glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
354   {
355     ::glBlendColor (red, green, blue, alpha);
356   }
357
358   inline void glBlendEquation (GLenum mode)
359   {
360     ::glBlendEquation (mode);
361   }
362
363   inline void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
364   {
365     ::glBlendFuncSeparate (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
366   }
367
368   inline void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
369   {
370     ::glBlendEquationSeparate (modeRGB, modeAlpha);
371   }
372
373   inline void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
374   {
375     ::glStencilOpSeparate (face, sfail, dpfail, dppass);
376   }
377
378   inline void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
379   {
380     ::glStencilFuncSeparate (face, func, ref, mask);
381   }
382
383   inline void glStencilMaskSeparate (GLenum face, GLuint mask)
384   {
385     ::glStencilMaskSeparate (face, mask);
386   }
387
388   inline void glAttachShader (GLuint program, GLuint shader)
389   {
390     ::glAttachShader (program, shader);
391   }
392
393   inline void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name)
394   {
395     ::glBindAttribLocation (program, index, name);
396   }
397
398   inline void glBindFramebuffer (GLenum target, GLuint framebuffer)
399   {
400     ::glBindFramebuffer (target, framebuffer);
401   }
402
403   inline void glBindRenderbuffer (GLenum target, GLuint renderbuffer)
404   {
405     ::glBindRenderbuffer (target, renderbuffer);
406   }
407
408   inline GLenum glCheckFramebufferStatus (GLenum target)
409   {
410     return ::glCheckFramebufferStatus (target);
411   }
412
413   inline void glCompileShader (GLuint shader)
414   {
415     ::glCompileShader (shader);
416   }
417
418   inline GLuint glCreateProgram()
419   {
420     return ::glCreateProgram();
421   }
422
423   inline GLuint glCreateShader (GLenum type)
424   {
425     return ::glCreateShader (type);
426   }
427
428   inline void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers)
429   {
430     ::glDeleteFramebuffers (n, framebuffers);
431   }
432
433   inline void glDeleteProgram (GLuint program)
434   {
435     ::glDeleteProgram (program);
436   }
437
438   inline void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers)
439   {
440     ::glDeleteRenderbuffers (n, renderbuffers);
441   }
442
443   inline void glDeleteShader (GLuint shader)
444   {
445     ::glDeleteShader (shader);
446   }
447
448   inline void glDetachShader (GLuint program, GLuint shader)
449   {
450     ::glDetachShader (program, shader);
451   }
452
453   inline void glDisableVertexAttribArray (GLuint index)
454   {
455     ::glDisableVertexAttribArray (index);
456   }
457
458   inline void glEnableVertexAttribArray (GLuint index)
459   {
460     ::glEnableVertexAttribArray (index);
461   }
462
463   inline void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
464   {
465     ::glFramebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer);
466   }
467
468   inline void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
469   {
470     ::glFramebufferTexture2D (target, attachment, textarget, texture, level);
471   }
472
473   inline void glGenerateMipmap (GLenum target)
474   {
475     ::glGenerateMipmap (target);
476   }
477
478   inline void glGenFramebuffers (GLsizei n, GLuint *framebuffers)
479   {
480     ::glGenFramebuffers (n, framebuffers);
481   }
482
483   inline void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers)
484   {
485     ::glGenRenderbuffers (n, renderbuffers);
486   }
487
488   inline void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name)
489   {
490     ::glGetActiveAttrib (program, index, bufSize, length, size, type, name);
491   }
492
493   inline void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name)
494   {
495     ::glGetActiveUniform (program, index, bufSize, length, size, type, name);
496   }
497
498   inline void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
499   {
500     ::glGetAttachedShaders (program, maxCount, count, shaders);
501   }
502
503   inline GLint glGetAttribLocation (GLuint program, const GLchar *name)
504   {
505     return ::glGetAttribLocation (program, name);
506   }
507
508   inline void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
509   {
510     ::glGetFramebufferAttachmentParameteriv (target, attachment, pname, params);
511   }
512
513   inline void glGetProgramiv (GLuint program, GLenum pname, GLint* params)
514   {
515     ::glGetProgramiv (program, pname, params);
516   }
517
518   inline void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
519   {
520     ::glGetProgramInfoLog (program, bufSize, length, infoLog);
521   }
522
523   inline void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
524   {
525     ::glGetRenderbufferParameteriv (target, pname, params);
526   }
527
528   inline void glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
529   {
530     ::glGetShaderiv (shader, pname, params);
531   }
532
533   inline void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
534   {
535     ::glGetShaderInfoLog (shader, bufSize, length, infoLog);
536   }
537
538   inline void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
539   {
540     ::glGetShaderPrecisionFormat (shadertype, precisiontype, range, precision);
541   }
542
543   inline void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
544   {
545     ::glGetShaderSource (shader, bufSize, length, source);
546   }
547
548   inline void glGetUniformfv (GLuint program, GLint location, GLfloat* params)
549   {
550     ::glGetUniformfv (program, location, params);
551   }
552
553   inline void glGetUniformiv (GLuint program, GLint location, GLint* params)
554   {
555     ::glGetUniformiv (program, location, params);
556   }
557
558   GLint glGetUniformLocation (GLuint program, const GLchar *name)
559   {
560     return ::glGetUniformLocation (program, name);
561   }
562
563   inline void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
564   {
565     ::glGetVertexAttribfv (index, pname, params);
566   }
567
568   inline void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
569   {
570     ::glGetVertexAttribiv (index, pname, params);
571   }
572
573   inline void glGetVertexAttribPointerv (GLuint index, GLenum pname, void* *pointer)
574   {
575     ::glGetVertexAttribPointerv (index, pname, pointer);
576   }
577
578   inline GLboolean glIsFramebuffer (GLuint framebuffer)
579   {
580     return ::glIsFramebuffer (framebuffer);
581   }
582
583   inline GLboolean glIsProgram (GLuint program)
584   {
585     return ::glIsProgram (program);
586   }
587
588   inline GLboolean glIsRenderbuffer (GLuint renderbuffer)
589   {
590     return ::glIsRenderbuffer (renderbuffer);
591   }
592
593   inline GLboolean glIsShader (GLuint shader)
594   {
595     return ::glIsShader (shader);
596   }
597
598   inline void glLinkProgram (GLuint program)
599   {
600     ::glLinkProgram (program);
601   }
602
603   inline void glReleaseShaderCompiler()
604   {
605     ::glReleaseShaderCompiler();
606   }
607
608   inline void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
609   {
610     ::glRenderbufferStorage (target, internalformat, width, height);
611   }
612
613   inline void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length)
614   {
615     ::glShaderBinary (count, shaders, binaryformat, binary, length);
616   }
617
618   inline void glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
619   {
620     ::glShaderSource (shader, count, string, length);
621   }
622
623   inline void glUniform1f (GLint location, GLfloat v0)
624   {
625     ::glUniform1f (location, v0);
626   }
627
628   inline void glUniform1fv (GLint location, GLsizei count, const GLfloat* value)
629   {
630     ::glUniform1fv (location, count, value);
631   }
632
633   inline void glUniform1i (GLint location, GLint v0)
634   {
635     ::glUniform1i (location, v0);
636   }
637
638   inline void glUniform1iv (GLint location, GLsizei count, const GLint* value)
639   {
640     ::glUniform1iv (location, count, value);
641   }
642
643   inline void glUniform2f (GLint location, GLfloat v0, GLfloat v1)
644   {
645     ::glUniform2f (location, v0, v1);
646   }
647
648   inline void glUniform2fv (GLint location, GLsizei count, const GLfloat* value)
649   {
650     ::glUniform2fv (location, count, value);
651   }
652
653   inline void glUniform2i (GLint location, GLint v0, GLint v1)
654   {
655     ::glUniform2i (location, v0, v1);
656   }
657
658   inline void glUniform2iv (GLint location, GLsizei count, const GLint* value)
659   {
660     ::glUniform2iv (location, count, value);
661   }
662
663   inline void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
664   {
665     ::glUniform3f (location, v0, v1, v2);
666   }
667
668   inline void glUniform3fv (GLint location, GLsizei count, const GLfloat* value)
669   {
670     ::glUniform3fv (location, count, value);
671   }
672
673   inline void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2)
674   {
675     ::glUniform3i (location, v0, v1, v2);
676   }
677
678   inline void glUniform3iv (GLint location, GLsizei count, const GLint* value)
679   {
680     ::glUniform3iv (location, count, value);
681   }
682
683   inline void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
684   {
685     ::glUniform4f (location, v0, v1, v2, v3);
686   }
687
688   inline void glUniform4fv (GLint location, GLsizei count, const GLfloat* value)
689   {
690     ::glUniform4fv (location, count, value);
691   }
692
693   inline void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
694   {
695     ::glUniform4i (location, v0, v1, v2, v3);
696   }
697
698   inline void glUniform4iv (GLint location, GLsizei count, const GLint* value)
699   {
700     ::glUniform4iv (location, count, value);
701   }
702
703   inline void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
704   {
705     ::glUniformMatrix2fv (location, count, transpose, value);
706   }
707
708   inline void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
709   {
710     ::glUniformMatrix3fv (location, count, transpose, value);
711   }
712
713   inline void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
714   {
715     ::glUniformMatrix4fv (location, count, transpose, value);
716   }
717
718   inline void glUseProgram (GLuint program)
719   {
720     ::glUseProgram (program);
721   }
722
723   inline void glValidateProgram (GLuint program)
724   {
725     ::glValidateProgram (program);
726   }
727
728   inline void glVertexAttrib1f (GLuint index, GLfloat x)
729   {
730     ::glVertexAttrib1f (index, x);
731   }
732
733   inline void glVertexAttrib1fv (GLuint index, const GLfloat* v)
734   {
735     ::glVertexAttrib1fv (index, v);
736   }
737
738   inline void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y)
739   {
740     ::glVertexAttrib2f (index, x, y);
741   }
742
743   inline void glVertexAttrib2fv (GLuint index, const GLfloat* v)
744   {
745     ::glVertexAttrib2fv (index, v);
746   }
747
748   inline void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z)
749   {
750     ::glVertexAttrib3f (index, x, y, z);
751   }
752
753   inline void glVertexAttrib3fv (GLuint index, const GLfloat* v)
754   {
755     ::glVertexAttrib3fv (index, v);
756   }
757
758   inline void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
759   {
760     ::glVertexAttrib4f (index, x, y, z, w);
761   }
762
763   inline void glVertexAttrib4fv (GLuint index, const GLfloat* v)
764   {
765     ::glVertexAttrib4fv (index, v);
766   }
767
768   inline void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer)
769   {
770     ::glVertexAttribPointer (index, size, type, normalized, stride, pointer);
771   }
772
773 public: //! @name OpenGL ES 3.0
774
775   typedef void (APIENTRY *glBlitFramebuffer_t)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
776   glBlitFramebuffer_t glBlitFramebuffer;
777
778   typedef void (APIENTRY *glTexImage3D_t)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* data);
779   glTexImage3D_t glTexImage3D;
780
781   typedef void (APIENTRY *glDrawBuffers_t)(GLsizei n, const GLenum* bufs);
782   glDrawBuffers_t glDrawBuffers;
783
784   typedef void (APIENTRY *glGenSamplers_t)(GLsizei count, GLuint* samplers);
785   glGenSamplers_t glGenSamplers;
786
787   typedef void (APIENTRY *glDeleteSamplers_t)(GLsizei count, const GLuint* samplers);
788   glDeleteSamplers_t glDeleteSamplers;
789
790   typedef GLboolean (APIENTRY *glIsSampler_t)(GLuint sampler);
791   glIsSampler_t glIsSampler;
792
793   typedef void (APIENTRY *glBindSampler_t)(GLuint unit, GLuint sampler);
794   glBindSampler_t glBindSampler;
795
796   typedef void (APIENTRY *glSamplerParameteri_t)(GLuint sampler, GLenum pname, GLint param);
797   glSamplerParameteri_t glSamplerParameteri;
798
799   typedef void (APIENTRY *glSamplerParameteriv_t)(GLuint sampler, GLenum pname, const GLint* param);
800   glSamplerParameteriv_t glSamplerParameteriv;
801
802   typedef void (APIENTRY *glSamplerParameterf_t)(GLuint sampler, GLenum pname, GLfloat param);
803   glSamplerParameterf_t glSamplerParameterf;
804
805   typedef void (APIENTRY *glSamplerParameterfv_t)(GLuint sampler, GLenum pname, const GLfloat* param);
806   glSamplerParameterfv_t glSamplerParameterfv;
807
808   typedef void (APIENTRY *glGetSamplerParameteriv_t)(GLuint sampler, GLenum pname, GLint* params);
809   glGetSamplerParameteriv_t glGetSamplerParameteriv;
810
811   typedef void (APIENTRY *glGetSamplerParameterfv_t)(GLuint sampler, GLenum pname, GLfloat* params);
812   glGetSamplerParameterfv_t glGetSamplerParameterfv;
813
814 public: //! @name OpenGL ES 3.1
815
816   typedef void (APIENTRY *glTexStorage2DMultisample_t)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
817   glTexStorage2DMultisample_t glTexStorage2DMultisample;
818
819 public: //! @name OpenGL ES 3.2
820
821   typedef void (APIENTRY *glTexBuffer_t)(GLenum target, GLenum internalFormat, GLuint buffer);
822   glTexBuffer_t glTexBuffer;
823
824 public: //! @name GL_KHR_debug (optional)
825
826   typedef void   (APIENTRY  *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
827
828   typedef void   (APIENTRYP glDebugMessageControl_t ) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
829   typedef void   (APIENTRYP glDebugMessageInsert_t  ) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf);
830   typedef void   (APIENTRYP glDebugMessageCallback_t) (GLDEBUGPROCARB callback, const void* userParam);
831   typedef GLuint (APIENTRYP glGetDebugMessageLog_t  ) (GLuint   count,
832                                                        GLsizei  bufSize,
833                                                        GLenum*  sources,
834                                                        GLenum*  types,
835                                                        GLuint*  ids,
836                                                        GLenum*  severities,
837                                                        GLsizei* lengths,
838                                                        GLchar*  messageLog);
839
840   glDebugMessageControl_t  glDebugMessageControl;
841   glDebugMessageInsert_t   glDebugMessageInsert;
842   glDebugMessageCallback_t glDebugMessageCallback;
843   glGetDebugMessageLog_t   glGetDebugMessageLog;
844
845 #else // OpenGL ES vs. desktop
846
847 public: //! @name OpenGL 1.2
848
849   PFNGLBLENDCOLORPROC               glBlendColor;
850   PFNGLBLENDEQUATIONPROC            glBlendEquation;
851   PFNGLDRAWRANGEELEMENTSPROC        glDrawRangeElements;
852   PFNGLTEXIMAGE3DPROC               glTexImage3D;
853   PFNGLTEXSUBIMAGE3DPROC            glTexSubImage3D;
854   PFNGLCOPYTEXSUBIMAGE3DPROC        glCopyTexSubImage3D;
855
856 public: //! @name OpenGL 1.3
857
858   PFNGLACTIVETEXTUREPROC            glActiveTexture;
859   PFNGLSAMPLECOVERAGEPROC           glSampleCoverage;
860   PFNGLCOMPRESSEDTEXIMAGE3DPROC     glCompressedTexImage3D;
861   PFNGLCOMPRESSEDTEXIMAGE2DPROC     glCompressedTexImage2D;
862   PFNGLCOMPRESSEDTEXIMAGE1DPROC     glCompressedTexImage1D;
863   PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC  glCompressedTexSubImage3D;
864   PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC  glCompressedTexSubImage2D;
865   PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC  glCompressedTexSubImage1D;
866   PFNGLGETCOMPRESSEDTEXIMAGEPROC    glGetCompressedTexImage;
867
868   PFNGLCLIENTACTIVETEXTUREPROC      glClientActiveTexture;
869   PFNGLMULTITEXCOORD1DPROC          glMultiTexCoord1d;
870   PFNGLMULTITEXCOORD1DVPROC         glMultiTexCoord1dv;
871   PFNGLMULTITEXCOORD1FPROC          glMultiTexCoord1f;
872   PFNGLMULTITEXCOORD1FVPROC         glMultiTexCoord1fv;
873   PFNGLMULTITEXCOORD1IPROC          glMultiTexCoord1i;
874   PFNGLMULTITEXCOORD1IVPROC         glMultiTexCoord1iv;
875   PFNGLMULTITEXCOORD1SPROC          glMultiTexCoord1s;
876   PFNGLMULTITEXCOORD1SVPROC         glMultiTexCoord1sv;
877   PFNGLMULTITEXCOORD2DPROC          glMultiTexCoord2d;
878   PFNGLMULTITEXCOORD2DVPROC         glMultiTexCoord2dv;
879   PFNGLMULTITEXCOORD2FPROC          glMultiTexCoord2f;
880   PFNGLMULTITEXCOORD2FVPROC         glMultiTexCoord2fv;
881   PFNGLMULTITEXCOORD2IPROC          glMultiTexCoord2i;
882   PFNGLMULTITEXCOORD2IVPROC         glMultiTexCoord2iv;
883   PFNGLMULTITEXCOORD2SPROC          glMultiTexCoord2s;
884   PFNGLMULTITEXCOORD2SVPROC         glMultiTexCoord2sv;
885   PFNGLMULTITEXCOORD3DPROC          glMultiTexCoord3d;
886   PFNGLMULTITEXCOORD3DVPROC         glMultiTexCoord3dv;
887   PFNGLMULTITEXCOORD3FPROC          glMultiTexCoord3f;
888   PFNGLMULTITEXCOORD3FVPROC         glMultiTexCoord3fv;
889   PFNGLMULTITEXCOORD3IPROC          glMultiTexCoord3i;
890   PFNGLMULTITEXCOORD3IVPROC         glMultiTexCoord3iv;
891   PFNGLMULTITEXCOORD3SPROC          glMultiTexCoord3s;
892   PFNGLMULTITEXCOORD3SVPROC         glMultiTexCoord3sv;
893   PFNGLMULTITEXCOORD4DPROC          glMultiTexCoord4d;
894   PFNGLMULTITEXCOORD4DVPROC         glMultiTexCoord4dv;
895   PFNGLMULTITEXCOORD4FPROC          glMultiTexCoord4f;
896   PFNGLMULTITEXCOORD4FVPROC         glMultiTexCoord4fv;
897   PFNGLMULTITEXCOORD4IPROC          glMultiTexCoord4i;
898   PFNGLMULTITEXCOORD4IVPROC         glMultiTexCoord4iv;
899   PFNGLMULTITEXCOORD4SPROC          glMultiTexCoord4s;
900   PFNGLMULTITEXCOORD4SVPROC         glMultiTexCoord4sv;
901   PFNGLLOADTRANSPOSEMATRIXFPROC     glLoadTransposeMatrixf;
902   PFNGLLOADTRANSPOSEMATRIXDPROC     glLoadTransposeMatrixd;
903   PFNGLMULTTRANSPOSEMATRIXFPROC     glMultTransposeMatrixf;
904   PFNGLMULTTRANSPOSEMATRIXDPROC     glMultTransposeMatrixd;
905
906 public: //! @name OpenGL 1.4
907
908   PFNGLBLENDFUNCSEPARATEPROC        glBlendFuncSeparate;
909   PFNGLMULTIDRAWARRAYSPROC          glMultiDrawArrays;
910   PFNGLMULTIDRAWELEMENTSPROC        glMultiDrawElements;
911   PFNGLPOINTPARAMETERFPROC          glPointParameterf;
912   PFNGLPOINTPARAMETERFVPROC         glPointParameterfv;
913   PFNGLPOINTPARAMETERIPROC          glPointParameteri;
914   PFNGLPOINTPARAMETERIVPROC         glPointParameteriv;
915
916 public: //! @name OpenGL 1.5
917
918   PFNGLGENQUERIESPROC               glGenQueries;
919   PFNGLDELETEQUERIESPROC            glDeleteQueries;
920   PFNGLISQUERYPROC                  glIsQuery;
921   PFNGLBEGINQUERYPROC               glBeginQuery;
922   PFNGLENDQUERYPROC                 glEndQuery;
923   PFNGLGETQUERYIVPROC               glGetQueryiv;
924   PFNGLGETQUERYOBJECTIVPROC         glGetQueryObjectiv;
925   PFNGLGETQUERYOBJECTUIVPROC        glGetQueryObjectuiv;
926   PFNGLBINDBUFFERPROC               glBindBuffer;
927   PFNGLDELETEBUFFERSPROC            glDeleteBuffers;
928   PFNGLGENBUFFERSPROC               glGenBuffers;
929   PFNGLISBUFFERPROC                 glIsBuffer;
930   PFNGLBUFFERDATAPROC               glBufferData;
931   PFNGLBUFFERSUBDATAPROC            glBufferSubData;
932   PFNGLGETBUFFERSUBDATAPROC         glGetBufferSubData;
933   PFNGLMAPBUFFERPROC                glMapBuffer;
934   PFNGLUNMAPBUFFERPROC              glUnmapBuffer;
935   PFNGLGETBUFFERPARAMETERIVPROC     glGetBufferParameteriv;
936   PFNGLGETBUFFERPOINTERVPROC        glGetBufferPointerv;
937
938 public: //! @name OpenGL 2.0
939
940   PFNGLBLENDEQUATIONSEPARATEPROC    glBlendEquationSeparate;
941   PFNGLDRAWBUFFERSPROC              glDrawBuffers;
942   PFNGLSTENCILOPSEPARATEPROC        glStencilOpSeparate;
943   PFNGLSTENCILFUNCSEPARATEPROC      glStencilFuncSeparate;
944   PFNGLSTENCILMASKSEPARATEPROC      glStencilMaskSeparate;
945   PFNGLATTACHSHADERPROC             glAttachShader;
946   PFNGLBINDATTRIBLOCATIONPROC       glBindAttribLocation;
947   PFNGLCOMPILESHADERPROC            glCompileShader;
948   PFNGLCREATEPROGRAMPROC            glCreateProgram;
949   PFNGLCREATESHADERPROC             glCreateShader;
950   PFNGLDELETEPROGRAMPROC            glDeleteProgram;
951   PFNGLDELETESHADERPROC             glDeleteShader;
952   PFNGLDETACHSHADERPROC             glDetachShader;
953   PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
954   PFNGLENABLEVERTEXATTRIBARRAYPROC  glEnableVertexAttribArray;
955   PFNGLGETACTIVEATTRIBPROC          glGetActiveAttrib;
956   PFNGLGETACTIVEUNIFORMPROC         glGetActiveUniform;
957   PFNGLGETATTACHEDSHADERSPROC       glGetAttachedShaders;
958   PFNGLGETATTRIBLOCATIONPROC        glGetAttribLocation;
959   PFNGLGETPROGRAMIVPROC             glGetProgramiv;
960   PFNGLGETPROGRAMINFOLOGPROC        glGetProgramInfoLog;
961   PFNGLGETSHADERIVPROC              glGetShaderiv;
962   PFNGLGETSHADERINFOLOGPROC         glGetShaderInfoLog;
963   PFNGLGETSHADERSOURCEPROC          glGetShaderSource;
964   PFNGLGETUNIFORMLOCATIONPROC       glGetUniformLocation;
965   PFNGLGETUNIFORMFVPROC             glGetUniformfv;
966   PFNGLGETUNIFORMIVPROC             glGetUniformiv;
967   PFNGLGETVERTEXATTRIBDVPROC        glGetVertexAttribdv;
968   PFNGLGETVERTEXATTRIBFVPROC        glGetVertexAttribfv;
969   PFNGLGETVERTEXATTRIBIVPROC        glGetVertexAttribiv;
970   PFNGLGETVERTEXATTRIBPOINTERVPROC  glGetVertexAttribPointerv;
971   PFNGLISPROGRAMPROC                glIsProgram;
972   PFNGLISSHADERPROC                 glIsShader;
973   PFNGLLINKPROGRAMPROC              glLinkProgram;
974   PFNGLSHADERSOURCEPROC             glShaderSource;
975   PFNGLUSEPROGRAMPROC               glUseProgram;
976   PFNGLUNIFORM1FPROC                glUniform1f;
977   PFNGLUNIFORM2FPROC                glUniform2f;
978   PFNGLUNIFORM3FPROC                glUniform3f;
979   PFNGLUNIFORM4FPROC                glUniform4f;
980   PFNGLUNIFORM1IPROC                glUniform1i;
981   PFNGLUNIFORM2IPROC                glUniform2i;
982   PFNGLUNIFORM3IPROC                glUniform3i;
983   PFNGLUNIFORM4IPROC                glUniform4i;
984   PFNGLUNIFORM1FVPROC               glUniform1fv;
985   PFNGLUNIFORM2FVPROC               glUniform2fv;
986   PFNGLUNIFORM3FVPROC               glUniform3fv;
987   PFNGLUNIFORM4FVPROC               glUniform4fv;
988   PFNGLUNIFORM1IVPROC               glUniform1iv;
989   PFNGLUNIFORM2IVPROC               glUniform2iv;
990   PFNGLUNIFORM3IVPROC               glUniform3iv;
991   PFNGLUNIFORM4IVPROC               glUniform4iv;
992   PFNGLUNIFORMMATRIX2FVPROC         glUniformMatrix2fv;
993   PFNGLUNIFORMMATRIX3FVPROC         glUniformMatrix3fv;
994   PFNGLUNIFORMMATRIX4FVPROC         glUniformMatrix4fv;
995   PFNGLVALIDATEPROGRAMPROC          glValidateProgram;
996   PFNGLVERTEXATTRIB1DPROC           glVertexAttrib1d;
997   PFNGLVERTEXATTRIB1DVPROC          glVertexAttrib1dv;
998   PFNGLVERTEXATTRIB1FPROC           glVertexAttrib1f;
999   PFNGLVERTEXATTRIB1FVPROC          glVertexAttrib1fv;
1000   PFNGLVERTEXATTRIB1SPROC           glVertexAttrib1s;
1001   PFNGLVERTEXATTRIB1SVPROC          glVertexAttrib1sv;
1002   PFNGLVERTEXATTRIB2DPROC           glVertexAttrib2d;
1003   PFNGLVERTEXATTRIB2DVPROC          glVertexAttrib2dv;
1004   PFNGLVERTEXATTRIB2FPROC           glVertexAttrib2f;
1005   PFNGLVERTEXATTRIB2FVPROC          glVertexAttrib2fv;
1006   PFNGLVERTEXATTRIB2SPROC           glVertexAttrib2s;
1007   PFNGLVERTEXATTRIB2SVPROC          glVertexAttrib2sv;
1008   PFNGLVERTEXATTRIB3DPROC           glVertexAttrib3d;
1009   PFNGLVERTEXATTRIB3DVPROC          glVertexAttrib3dv;
1010   PFNGLVERTEXATTRIB3FPROC           glVertexAttrib3f;
1011   PFNGLVERTEXATTRIB3FVPROC          glVertexAttrib3fv;
1012   PFNGLVERTEXATTRIB3SPROC           glVertexAttrib3s;
1013   PFNGLVERTEXATTRIB3SVPROC          glVertexAttrib3sv;
1014   PFNGLVERTEXATTRIB4NBVPROC         glVertexAttrib4Nbv;
1015   PFNGLVERTEXATTRIB4NIVPROC         glVertexAttrib4Niv;
1016   PFNGLVERTEXATTRIB4NSVPROC         glVertexAttrib4Nsv;
1017   PFNGLVERTEXATTRIB4NUBPROC         glVertexAttrib4Nub;
1018   PFNGLVERTEXATTRIB4NUBVPROC        glVertexAttrib4Nubv;
1019   PFNGLVERTEXATTRIB4NUIVPROC        glVertexAttrib4Nuiv;
1020   PFNGLVERTEXATTRIB4NUSVPROC        glVertexAttrib4Nusv;
1021   PFNGLVERTEXATTRIB4BVPROC          glVertexAttrib4bv;
1022   PFNGLVERTEXATTRIB4DPROC           glVertexAttrib4d;
1023   PFNGLVERTEXATTRIB4DVPROC          glVertexAttrib4dv;
1024   PFNGLVERTEXATTRIB4FPROC           glVertexAttrib4f;
1025   PFNGLVERTEXATTRIB4FVPROC          glVertexAttrib4fv;
1026   PFNGLVERTEXATTRIB4IVPROC          glVertexAttrib4iv;
1027   PFNGLVERTEXATTRIB4SPROC           glVertexAttrib4s;
1028   PFNGLVERTEXATTRIB4SVPROC          glVertexAttrib4sv;
1029   PFNGLVERTEXATTRIB4UBVPROC         glVertexAttrib4ubv;
1030   PFNGLVERTEXATTRIB4UIVPROC         glVertexAttrib4uiv;
1031   PFNGLVERTEXATTRIB4USVPROC         glVertexAttrib4usv;
1032   PFNGLVERTEXATTRIBPOINTERPROC      glVertexAttribPointer;
1033
1034 public: //! @name OpenGL 2.1
1035
1036   PFNGLUNIFORMMATRIX2X3FVPROC       glUniformMatrix2x3fv;
1037   PFNGLUNIFORMMATRIX3X2FVPROC       glUniformMatrix3x2fv;
1038   PFNGLUNIFORMMATRIX2X4FVPROC       glUniformMatrix2x4fv;
1039   PFNGLUNIFORMMATRIX4X2FVPROC       glUniformMatrix4x2fv;
1040   PFNGLUNIFORMMATRIX3X4FVPROC       glUniformMatrix3x4fv;
1041   PFNGLUNIFORMMATRIX4X3FVPROC       glUniformMatrix4x3fv;
1042
1043 public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
1044
1045   PFNGLISRENDERBUFFERPROC                      glIsRenderbuffer;
1046   PFNGLBINDRENDERBUFFERPROC                    glBindRenderbuffer;
1047   PFNGLDELETERENDERBUFFERSPROC                 glDeleteRenderbuffers;
1048   PFNGLGENRENDERBUFFERSPROC                    glGenRenderbuffers;
1049   PFNGLRENDERBUFFERSTORAGEPROC                 glRenderbufferStorage;
1050   PFNGLGETRENDERBUFFERPARAMETERIVPROC          glGetRenderbufferParameteriv;
1051   PFNGLISFRAMEBUFFERPROC                       glIsFramebuffer;
1052   PFNGLBINDFRAMEBUFFERPROC                     glBindFramebuffer;
1053   PFNGLDELETEFRAMEBUFFERSPROC                  glDeleteFramebuffers;
1054   PFNGLGENFRAMEBUFFERSPROC                     glGenFramebuffers;
1055   PFNGLCHECKFRAMEBUFFERSTATUSPROC              glCheckFramebufferStatus;
1056   PFNGLFRAMEBUFFERTEXTURE1DPROC                glFramebufferTexture1D;
1057   PFNGLFRAMEBUFFERTEXTURE2DPROC                glFramebufferTexture2D;
1058   PFNGLFRAMEBUFFERTEXTURE3DPROC                glFramebufferTexture3D;
1059   PFNGLFRAMEBUFFERRENDERBUFFERPROC             glFramebufferRenderbuffer;
1060   PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv;
1061   PFNGLGENERATEMIPMAPPROC                      glGenerateMipmap;
1062   PFNGLBLITFRAMEBUFFERPROC                     glBlitFramebuffer;
1063   PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC      glRenderbufferStorageMultisample;
1064   PFNGLFRAMEBUFFERTEXTURELAYERPROC             glFramebufferTextureLayer;
1065
1066 public: //! @name GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
1067
1068   PFNGLBINDVERTEXARRAYPROC             glBindVertexArray;
1069   PFNGLDELETEVERTEXARRAYSPROC          glDeleteVertexArrays;
1070   PFNGLGENVERTEXARRAYSPROC             glGenVertexArrays;
1071   PFNGLISVERTEXARRAYPROC               glIsVertexArray;
1072
1073 public: //! @name GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
1074
1075   PFNGLMAPBUFFERRANGEPROC              glMapBufferRange;
1076   PFNGLFLUSHMAPPEDBUFFERRANGEPROC      glFlushMappedBufferRange;
1077
1078 public: //! @name OpenGL 3.0
1079
1080   PFNGLCOLORMASKIPROC                  glColorMaski;
1081   PFNGLGETBOOLEANI_VPROC               glGetBooleani_v;
1082   PFNGLGETINTEGERI_VPROC               glGetIntegeri_v;
1083   PFNGLENABLEIPROC                     glEnablei;
1084   PFNGLDISABLEIPROC                    glDisablei;
1085   PFNGLISENABLEDIPROC                  glIsEnabledi;
1086   PFNGLBEGINTRANSFORMFEEDBACKPROC      glBeginTransformFeedback;
1087   PFNGLENDTRANSFORMFEEDBACKPROC        glEndTransformFeedback;
1088   PFNGLBINDBUFFERRANGEPROC             glBindBufferRange;
1089   PFNGLBINDBUFFERBASEPROC              glBindBufferBase;
1090   PFNGLTRANSFORMFEEDBACKVARYINGSPROC   glTransformFeedbackVaryings;
1091   PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying;
1092   PFNGLCLAMPCOLORPROC                  glClampColor;
1093   PFNGLBEGINCONDITIONALRENDERPROC      glBeginConditionalRender;
1094   PFNGLENDCONDITIONALRENDERPROC        glEndConditionalRender;
1095   PFNGLVERTEXATTRIBIPOINTERPROC        glVertexAttribIPointer;
1096   PFNGLGETVERTEXATTRIBIIVPROC          glGetVertexAttribIiv;
1097   PFNGLGETVERTEXATTRIBIUIVPROC         glGetVertexAttribIuiv;
1098   PFNGLVERTEXATTRIBI1IPROC             glVertexAttribI1i;
1099   PFNGLVERTEXATTRIBI2IPROC             glVertexAttribI2i;
1100   PFNGLVERTEXATTRIBI3IPROC             glVertexAttribI3i;
1101   PFNGLVERTEXATTRIBI4IPROC             glVertexAttribI4i;
1102   PFNGLVERTEXATTRIBI1UIPROC            glVertexAttribI1ui;
1103   PFNGLVERTEXATTRIBI2UIPROC            glVertexAttribI2ui;
1104   PFNGLVERTEXATTRIBI3UIPROC            glVertexAttribI3ui;
1105   PFNGLVERTEXATTRIBI4UIPROC            glVertexAttribI4ui;
1106   PFNGLVERTEXATTRIBI1IVPROC            glVertexAttribI1iv;
1107   PFNGLVERTEXATTRIBI2IVPROC            glVertexAttribI2iv;
1108   PFNGLVERTEXATTRIBI3IVPROC            glVertexAttribI3iv;
1109   PFNGLVERTEXATTRIBI4IVPROC            glVertexAttribI4iv;
1110   PFNGLVERTEXATTRIBI1UIVPROC           glVertexAttribI1uiv;
1111   PFNGLVERTEXATTRIBI2UIVPROC           glVertexAttribI2uiv;
1112   PFNGLVERTEXATTRIBI3UIVPROC           glVertexAttribI3uiv;
1113   PFNGLVERTEXATTRIBI4UIVPROC           glVertexAttribI4uiv;
1114   PFNGLVERTEXATTRIBI4BVPROC            glVertexAttribI4bv;
1115   PFNGLVERTEXATTRIBI4SVPROC            glVertexAttribI4sv;
1116   PFNGLVERTEXATTRIBI4UBVPROC           glVertexAttribI4ubv;
1117   PFNGLVERTEXATTRIBI4USVPROC           glVertexAttribI4usv;
1118   PFNGLGETUNIFORMUIVPROC               glGetUniformuiv;
1119   PFNGLBINDFRAGDATALOCATIONPROC        glBindFragDataLocation;
1120   PFNGLGETFRAGDATALOCATIONPROC         glGetFragDataLocation;
1121   PFNGLUNIFORM1UIPROC                  glUniform1ui;
1122   PFNGLUNIFORM2UIPROC                  glUniform2ui;
1123   PFNGLUNIFORM3UIPROC                  glUniform3ui;
1124   PFNGLUNIFORM4UIPROC                  glUniform4ui;
1125   PFNGLUNIFORM1UIVPROC                 glUniform1uiv;
1126   PFNGLUNIFORM2UIVPROC                 glUniform2uiv;
1127   PFNGLUNIFORM3UIVPROC                 glUniform3uiv;
1128   PFNGLUNIFORM4UIVPROC                 glUniform4uiv;
1129   PFNGLTEXPARAMETERIIVPROC             glTexParameterIiv;
1130   PFNGLTEXPARAMETERIUIVPROC            glTexParameterIuiv;
1131   PFNGLGETTEXPARAMETERIIVPROC          glGetTexParameterIiv;
1132   PFNGLGETTEXPARAMETERIUIVPROC         glGetTexParameterIuiv;
1133   PFNGLCLEARBUFFERIVPROC               glClearBufferiv;
1134   PFNGLCLEARBUFFERUIVPROC              glClearBufferuiv;
1135   PFNGLCLEARBUFFERFVPROC               glClearBufferfv;
1136   PFNGLCLEARBUFFERFIPROC               glClearBufferfi;
1137   PFNGLGETSTRINGIPROC                  glGetStringi;
1138
1139 public: //! @name GL_ARB_uniform_buffer_object (added to OpenGL 3.1 core)
1140
1141   PFNGLGETUNIFORMINDICESPROC           glGetUniformIndices;
1142   PFNGLGETACTIVEUNIFORMSIVPROC         glGetActiveUniformsiv;
1143   PFNGLGETACTIVEUNIFORMNAMEPROC        glGetActiveUniformName;
1144   PFNGLGETUNIFORMBLOCKINDEXPROC        glGetUniformBlockIndex;
1145   PFNGLGETACTIVEUNIFORMBLOCKIVPROC     glGetActiveUniformBlockiv;
1146   PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC   glGetActiveUniformBlockName;
1147   PFNGLUNIFORMBLOCKBINDINGPROC         glUniformBlockBinding;
1148
1149 public: //! @name GL_ARB_copy_buffer (added to OpenGL 3.1 core)
1150
1151   PFNGLCOPYBUFFERSUBDATAPROC           glCopyBufferSubData;
1152
1153 public: //! @name OpenGL 3.1
1154
1155   PFNGLDRAWARRAYSINSTANCEDPROC         glDrawArraysInstanced;
1156   PFNGLDRAWELEMENTSINSTANCEDPROC       glDrawElementsInstanced;
1157   PFNGLTEXBUFFERPROC                   glTexBuffer;
1158   PFNGLPRIMITIVERESTARTINDEXPROC       glPrimitiveRestartIndex;
1159
1160 public: //! @name GL_ARB_draw_elements_base_vertex (added to OpenGL 3.2 core)
1161
1162   PFNGLDRAWELEMENTSBASEVERTEXPROC      glDrawElementsBaseVertex;
1163   PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex;
1164   PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex;
1165   PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex;
1166
1167 public: //! @name GL_ARB_provoking_vertex (added to OpenGL 3.2 core)
1168
1169   PFNGLPROVOKINGVERTEXPROC             glProvokingVertex;
1170
1171 public: //! @name GL_ARB_sync (added to OpenGL 3.2 core)
1172
1173   PFNGLFENCESYNCPROC                   glFenceSync;
1174   PFNGLISSYNCPROC                      glIsSync;
1175   PFNGLDELETESYNCPROC                  glDeleteSync;
1176   PFNGLCLIENTWAITSYNCPROC              glClientWaitSync;
1177   PFNGLWAITSYNCPROC                    glWaitSync;
1178   PFNGLGETINTEGER64VPROC               glGetInteger64v;
1179   PFNGLGETSYNCIVPROC                   glGetSynciv;
1180
1181 public: //! @name GL_ARB_texture_multisample (added to OpenGL 3.2 core)
1182
1183   PFNGLTEXIMAGE2DMULTISAMPLEPROC       glTexImage2DMultisample;
1184   PFNGLTEXIMAGE3DMULTISAMPLEPROC       glTexImage3DMultisample;
1185   PFNGLGETMULTISAMPLEFVPROC            glGetMultisamplefv;
1186   PFNGLSAMPLEMASKIPROC                 glSampleMaski;
1187
1188 public: //! @name OpenGL 3.2
1189
1190   PFNGLGETINTEGER64I_VPROC             glGetInteger64i_v;
1191   PFNGLGETBUFFERPARAMETERI64VPROC      glGetBufferParameteri64v;
1192   PFNGLFRAMEBUFFERTEXTUREPROC          glFramebufferTexture;
1193
1194 public: //! @name GL_ARB_blend_func_extended (added to OpenGL 3.3 core)
1195
1196   PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed;
1197   PFNGLGETFRAGDATAINDEXPROC            glGetFragDataIndex;
1198
1199 public: //! @name GL_ARB_sampler_objects (added to OpenGL 3.3 core)
1200
1201   PFNGLGENSAMPLERSPROC                 glGenSamplers;
1202   PFNGLDELETESAMPLERSPROC              glDeleteSamplers;
1203   PFNGLISSAMPLERPROC                   glIsSampler;
1204   PFNGLBINDSAMPLERPROC                 glBindSampler;
1205   PFNGLSAMPLERPARAMETERIPROC           glSamplerParameteri;
1206   PFNGLSAMPLERPARAMETERIVPROC          glSamplerParameteriv;
1207   PFNGLSAMPLERPARAMETERFPROC           glSamplerParameterf;
1208   PFNGLSAMPLERPARAMETERFVPROC          glSamplerParameterfv;
1209   PFNGLSAMPLERPARAMETERIIVPROC         glSamplerParameterIiv;
1210   PFNGLSAMPLERPARAMETERIUIVPROC        glSamplerParameterIuiv;
1211   PFNGLGETSAMPLERPARAMETERIVPROC       glGetSamplerParameteriv;
1212   PFNGLGETSAMPLERPARAMETERIIVPROC      glGetSamplerParameterIiv;
1213   PFNGLGETSAMPLERPARAMETERFVPROC       glGetSamplerParameterfv;
1214   PFNGLGETSAMPLERPARAMETERIUIVPROC     glGetSamplerParameterIuiv;
1215
1216 public: //! @name GL_ARB_timer_query (added to OpenGL 3.3 core)
1217
1218   PFNGLQUERYCOUNTERPROC                glQueryCounter;
1219   PFNGLGETQUERYOBJECTI64VPROC          glGetQueryObjecti64v;
1220   PFNGLGETQUERYOBJECTUI64VPROC         glGetQueryObjectui64v;
1221
1222 public: //! @name GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core)
1223
1224   PFNGLVERTEXP2UIPROC                  glVertexP2ui;
1225   PFNGLVERTEXP2UIVPROC                 glVertexP2uiv;
1226   PFNGLVERTEXP3UIPROC                  glVertexP3ui;
1227   PFNGLVERTEXP3UIVPROC                 glVertexP3uiv;
1228   PFNGLVERTEXP4UIPROC                  glVertexP4ui;
1229   PFNGLVERTEXP4UIVPROC                 glVertexP4uiv;
1230   PFNGLTEXCOORDP1UIPROC                glTexCoordP1ui;
1231   PFNGLTEXCOORDP1UIVPROC               glTexCoordP1uiv;
1232   PFNGLTEXCOORDP2UIPROC                glTexCoordP2ui;
1233   PFNGLTEXCOORDP2UIVPROC               glTexCoordP2uiv;
1234   PFNGLTEXCOORDP3UIPROC                glTexCoordP3ui;
1235   PFNGLTEXCOORDP3UIVPROC               glTexCoordP3uiv;
1236   PFNGLTEXCOORDP4UIPROC                glTexCoordP4ui;
1237   PFNGLTEXCOORDP4UIVPROC               glTexCoordP4uiv;
1238   PFNGLMULTITEXCOORDP1UIPROC           glMultiTexCoordP1ui;
1239   PFNGLMULTITEXCOORDP1UIVPROC          glMultiTexCoordP1uiv;
1240   PFNGLMULTITEXCOORDP2UIPROC           glMultiTexCoordP2ui;
1241   PFNGLMULTITEXCOORDP2UIVPROC          glMultiTexCoordP2uiv;
1242   PFNGLMULTITEXCOORDP3UIPROC           glMultiTexCoordP3ui;
1243   PFNGLMULTITEXCOORDP3UIVPROC          glMultiTexCoordP3uiv;
1244   PFNGLMULTITEXCOORDP4UIPROC           glMultiTexCoordP4ui;
1245   PFNGLMULTITEXCOORDP4UIVPROC          glMultiTexCoordP4uiv;
1246   PFNGLNORMALP3UIPROC                  glNormalP3ui;
1247   PFNGLNORMALP3UIVPROC                 glNormalP3uiv;
1248   PFNGLCOLORP3UIPROC                   glColorP3ui;
1249   PFNGLCOLORP3UIVPROC                  glColorP3uiv;
1250   PFNGLCOLORP4UIPROC                   glColorP4ui;
1251   PFNGLCOLORP4UIVPROC                  glColorP4uiv;
1252   PFNGLSECONDARYCOLORP3UIPROC          glSecondaryColorP3ui;
1253   PFNGLSECONDARYCOLORP3UIVPROC         glSecondaryColorP3uiv;
1254   PFNGLVERTEXATTRIBP1UIPROC            glVertexAttribP1ui;
1255   PFNGLVERTEXATTRIBP1UIVPROC           glVertexAttribP1uiv;
1256   PFNGLVERTEXATTRIBP2UIPROC            glVertexAttribP2ui;
1257   PFNGLVERTEXATTRIBP2UIVPROC           glVertexAttribP2uiv;
1258   PFNGLVERTEXATTRIBP3UIPROC            glVertexAttribP3ui;
1259   PFNGLVERTEXATTRIBP3UIVPROC           glVertexAttribP3uiv;
1260   PFNGLVERTEXATTRIBP4UIPROC            glVertexAttribP4ui;
1261   PFNGLVERTEXATTRIBP4UIVPROC           glVertexAttribP4uiv;
1262
1263 public: //! @name OpenGL 3.3
1264
1265   PFNGLVERTEXATTRIBDIVISORPROC         glVertexAttribDivisor;
1266
1267 public: //! @name GL_ARB_draw_indirect (added to OpenGL 4.0 core)
1268
1269   PFNGLDRAWARRAYSINDIRECTPROC          glDrawArraysIndirect;
1270   PFNGLDRAWELEMENTSINDIRECTPROC        glDrawElementsIndirect;
1271
1272 public: //! @name GL_ARB_gpu_shader_fp64 (added to OpenGL 4.0 core)
1273
1274   PFNGLUNIFORM1DPROC                   glUniform1d;
1275   PFNGLUNIFORM2DPROC                   glUniform2d;
1276   PFNGLUNIFORM3DPROC                   glUniform3d;
1277   PFNGLUNIFORM4DPROC                   glUniform4d;
1278   PFNGLUNIFORM1DVPROC                  glUniform1dv;
1279   PFNGLUNIFORM2DVPROC                  glUniform2dv;
1280   PFNGLUNIFORM3DVPROC                  glUniform3dv;
1281   PFNGLUNIFORM4DVPROC                  glUniform4dv;
1282   PFNGLUNIFORMMATRIX2DVPROC            glUniformMatrix2dv;
1283   PFNGLUNIFORMMATRIX3DVPROC            glUniformMatrix3dv;
1284   PFNGLUNIFORMMATRIX4DVPROC            glUniformMatrix4dv;
1285   PFNGLUNIFORMMATRIX2X3DVPROC          glUniformMatrix2x3dv;
1286   PFNGLUNIFORMMATRIX2X4DVPROC          glUniformMatrix2x4dv;
1287   PFNGLUNIFORMMATRIX3X2DVPROC          glUniformMatrix3x2dv;
1288   PFNGLUNIFORMMATRIX3X4DVPROC          glUniformMatrix3x4dv;
1289   PFNGLUNIFORMMATRIX4X2DVPROC          glUniformMatrix4x2dv;
1290   PFNGLUNIFORMMATRIX4X3DVPROC          glUniformMatrix4x3dv;
1291   PFNGLGETUNIFORMDVPROC                glGetUniformdv;
1292
1293 public: //! @name GL_ARB_shader_subroutine (added to OpenGL 4.0 core)
1294
1295   PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC   glGetSubroutineUniformLocation;
1296   PFNGLGETSUBROUTINEINDEXPROC             glGetSubroutineIndex;
1297   PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC   glGetActiveSubroutineUniformiv;
1298   PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glGetActiveSubroutineUniformName;
1299   PFNGLGETACTIVESUBROUTINENAMEPROC        glGetActiveSubroutineName;
1300   PFNGLUNIFORMSUBROUTINESUIVPROC          glUniformSubroutinesuiv;
1301   PFNGLGETUNIFORMSUBROUTINEUIVPROC        glGetUniformSubroutineuiv;
1302   PFNGLGETPROGRAMSTAGEIVPROC              glGetProgramStageiv;
1303
1304 public: //! @name GL_ARB_tessellation_shader (added to OpenGL 4.0 core)
1305
1306   PFNGLPATCHPARAMETERIPROC             glPatchParameteri;
1307   PFNGLPATCHPARAMETERFVPROC            glPatchParameterfv;
1308
1309 public: //! @name GL_ARB_transform_feedback2 (added to OpenGL 4.0 core)
1310
1311   PFNGLBINDTRANSFORMFEEDBACKPROC       glBindTransformFeedback;
1312   PFNGLDELETETRANSFORMFEEDBACKSPROC    glDeleteTransformFeedbacks;
1313   PFNGLGENTRANSFORMFEEDBACKSPROC       glGenTransformFeedbacks;
1314   PFNGLISTRANSFORMFEEDBACKPROC         glIsTransformFeedback;
1315   PFNGLPAUSETRANSFORMFEEDBACKPROC      glPauseTransformFeedback;
1316   PFNGLRESUMETRANSFORMFEEDBACKPROC     glResumeTransformFeedback;
1317   PFNGLDRAWTRANSFORMFEEDBACKPROC       glDrawTransformFeedback;
1318
1319 public: //! @name GL_ARB_transform_feedback3 (added to OpenGL 4.0 core)
1320
1321   PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glDrawTransformFeedbackStream;
1322   PFNGLBEGINQUERYINDEXEDPROC           glBeginQueryIndexed;
1323   PFNGLENDQUERYINDEXEDPROC             glEndQueryIndexed;
1324   PFNGLGETQUERYINDEXEDIVPROC           glGetQueryIndexediv;
1325
1326 public: //! @name OpenGL 4.0
1327
1328   PFNGLMINSAMPLESHADINGPROC            glMinSampleShading;
1329   PFNGLBLENDEQUATIONIPROC              glBlendEquationi;
1330   PFNGLBLENDEQUATIONSEPARATEIPROC      glBlendEquationSeparatei;
1331   PFNGLBLENDFUNCIPROC                  glBlendFunci;
1332   PFNGLBLENDFUNCSEPARATEIPROC          glBlendFuncSeparatei;
1333
1334 public: //! @name GL_ARB_ES2_compatibility (added to OpenGL 4.1 core)
1335
1336   PFNGLRELEASESHADERCOMPILERPROC       glReleaseShaderCompiler;
1337   PFNGLSHADERBINARYPROC                glShaderBinary;
1338   PFNGLGETSHADERPRECISIONFORMATPROC    glGetShaderPrecisionFormat;
1339   PFNGLDEPTHRANGEFPROC                 glDepthRangef;
1340   PFNGLCLEARDEPTHFPROC                 glClearDepthf;
1341
1342 public: //! @name GL_ARB_get_program_binary (added to OpenGL 4.1 core)
1343
1344   PFNGLGETPROGRAMBINARYPROC            glGetProgramBinary;
1345   PFNGLPROGRAMBINARYPROC               glProgramBinary;
1346   PFNGLPROGRAMPARAMETERIPROC           glProgramParameteri;
1347
1348 public: //! @name GL_ARB_separate_shader_objects (added to OpenGL 4.1 core)
1349
1350   PFNGLUSEPROGRAMSTAGESPROC            glUseProgramStages;
1351   PFNGLACTIVESHADERPROGRAMPROC         glActiveShaderProgram;
1352   PFNGLCREATESHADERPROGRAMVPROC        glCreateShaderProgramv;
1353   PFNGLBINDPROGRAMPIPELINEPROC         glBindProgramPipeline;
1354   PFNGLDELETEPROGRAMPIPELINESPROC      glDeleteProgramPipelines;
1355   PFNGLGENPROGRAMPIPELINESPROC         glGenProgramPipelines;
1356   PFNGLISPROGRAMPIPELINEPROC           glIsProgramPipeline;
1357   PFNGLGETPROGRAMPIPELINEIVPROC        glGetProgramPipelineiv;
1358   PFNGLPROGRAMUNIFORM1IPROC            glProgramUniform1i;
1359   PFNGLPROGRAMUNIFORM1IVPROC           glProgramUniform1iv;
1360   PFNGLPROGRAMUNIFORM1FPROC            glProgramUniform1f;
1361   PFNGLPROGRAMUNIFORM1FVPROC           glProgramUniform1fv;
1362   PFNGLPROGRAMUNIFORM1DPROC            glProgramUniform1d;
1363   PFNGLPROGRAMUNIFORM1DVPROC           glProgramUniform1dv;
1364   PFNGLPROGRAMUNIFORM1UIPROC           glProgramUniform1ui;
1365   PFNGLPROGRAMUNIFORM1UIVPROC          glProgramUniform1uiv;
1366   PFNGLPROGRAMUNIFORM2IPROC            glProgramUniform2i;
1367   PFNGLPROGRAMUNIFORM2IVPROC           glProgramUniform2iv;
1368   PFNGLPROGRAMUNIFORM2FPROC            glProgramUniform2f;
1369   PFNGLPROGRAMUNIFORM2FVPROC           glProgramUniform2fv;
1370   PFNGLPROGRAMUNIFORM2DPROC            glProgramUniform2d;
1371   PFNGLPROGRAMUNIFORM2DVPROC           glProgramUniform2dv;
1372   PFNGLPROGRAMUNIFORM2UIPROC           glProgramUniform2ui;
1373   PFNGLPROGRAMUNIFORM2UIVPROC          glProgramUniform2uiv;
1374   PFNGLPROGRAMUNIFORM3IPROC            glProgramUniform3i;
1375   PFNGLPROGRAMUNIFORM3IVPROC           glProgramUniform3iv;
1376   PFNGLPROGRAMUNIFORM3FPROC            glProgramUniform3f;
1377   PFNGLPROGRAMUNIFORM3FVPROC           glProgramUniform3fv;
1378   PFNGLPROGRAMUNIFORM3DPROC            glProgramUniform3d;
1379   PFNGLPROGRAMUNIFORM3DVPROC           glProgramUniform3dv;
1380   PFNGLPROGRAMUNIFORM3UIPROC           glProgramUniform3ui;
1381   PFNGLPROGRAMUNIFORM3UIVPROC          glProgramUniform3uiv;
1382   PFNGLPROGRAMUNIFORM4IPROC            glProgramUniform4i;
1383   PFNGLPROGRAMUNIFORM4IVPROC           glProgramUniform4iv;
1384   PFNGLPROGRAMUNIFORM4FPROC            glProgramUniform4f;
1385   PFNGLPROGRAMUNIFORM4FVPROC           glProgramUniform4fv;
1386   PFNGLPROGRAMUNIFORM4DPROC            glProgramUniform4d;
1387   PFNGLPROGRAMUNIFORM4DVPROC           glProgramUniform4dv;
1388   PFNGLPROGRAMUNIFORM4UIPROC           glProgramUniform4ui;
1389   PFNGLPROGRAMUNIFORM4UIVPROC          glProgramUniform4uiv;
1390   PFNGLPROGRAMUNIFORMMATRIX2FVPROC     glProgramUniformMatrix2fv;
1391   PFNGLPROGRAMUNIFORMMATRIX3FVPROC     glProgramUniformMatrix3fv;
1392   PFNGLPROGRAMUNIFORMMATRIX4FVPROC     glProgramUniformMatrix4fv;
1393   PFNGLPROGRAMUNIFORMMATRIX2DVPROC     glProgramUniformMatrix2dv;
1394   PFNGLPROGRAMUNIFORMMATRIX3DVPROC     glProgramUniformMatrix3dv;
1395   PFNGLPROGRAMUNIFORMMATRIX4DVPROC     glProgramUniformMatrix4dv;
1396   PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC   glProgramUniformMatrix2x3fv;
1397   PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC   glProgramUniformMatrix3x2fv;
1398   PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC   glProgramUniformMatrix2x4fv;
1399   PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC   glProgramUniformMatrix4x2fv;
1400   PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC   glProgramUniformMatrix3x4fv;
1401   PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC   glProgramUniformMatrix4x3fv;
1402   PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC   glProgramUniformMatrix2x3dv;
1403   PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC   glProgramUniformMatrix3x2dv;
1404   PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC   glProgramUniformMatrix2x4dv;
1405   PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC   glProgramUniformMatrix4x2dv;
1406   PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC   glProgramUniformMatrix3x4dv;
1407   PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC   glProgramUniformMatrix4x3dv;
1408   PFNGLVALIDATEPROGRAMPIPELINEPROC     glValidateProgramPipeline;
1409   PFNGLGETPROGRAMPIPELINEINFOLOGPROC   glGetProgramPipelineInfoLog;
1410
1411 public: //! @name GL_ARB_vertex_attrib_64bit (added to OpenGL 4.1 core)
1412
1413   PFNGLVERTEXATTRIBL1DPROC             glVertexAttribL1d;
1414   PFNGLVERTEXATTRIBL2DPROC             glVertexAttribL2d;
1415   PFNGLVERTEXATTRIBL3DPROC             glVertexAttribL3d;
1416   PFNGLVERTEXATTRIBL4DPROC             glVertexAttribL4d;
1417   PFNGLVERTEXATTRIBL1DVPROC            glVertexAttribL1dv;
1418   PFNGLVERTEXATTRIBL2DVPROC            glVertexAttribL2dv;
1419   PFNGLVERTEXATTRIBL3DVPROC            glVertexAttribL3dv;
1420   PFNGLVERTEXATTRIBL4DVPROC            glVertexAttribL4dv;
1421   PFNGLVERTEXATTRIBLPOINTERPROC        glVertexAttribLPointer;
1422   PFNGLGETVERTEXATTRIBLDVPROC          glGetVertexAttribLdv;
1423
1424 public: //! @name GL_ARB_viewport_array (added to OpenGL 4.1 core)
1425
1426   PFNGLVIEWPORTARRAYVPROC              glViewportArrayv;
1427   PFNGLVIEWPORTINDEXEDFPROC            glViewportIndexedf;
1428   PFNGLVIEWPORTINDEXEDFVPROC           glViewportIndexedfv;
1429   PFNGLSCISSORARRAYVPROC               glScissorArrayv;
1430   PFNGLSCISSORINDEXEDPROC              glScissorIndexed;
1431   PFNGLSCISSORINDEXEDVPROC             glScissorIndexedv;
1432   PFNGLDEPTHRANGEARRAYVPROC            glDepthRangeArrayv;
1433   PFNGLDEPTHRANGEINDEXEDPROC           glDepthRangeIndexed;
1434   PFNGLGETFLOATI_VPROC                 glGetFloati_v;
1435   PFNGLGETDOUBLEI_VPROC                glGetDoublei_v;
1436
1437 public: //! @name OpenGL 4.1
1438
1439   //
1440
1441 public: //! @name GL_ARB_base_instance (added to OpenGL 4.2 core)
1442
1443   PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC             glDrawArraysInstancedBaseInstance;
1444   PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC           glDrawElementsInstancedBaseInstance;
1445   PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glDrawElementsInstancedBaseVertexBaseInstance;
1446
1447 public: //! @name GL_ARB_transform_feedback_instanced (added to OpenGL 4.2 core)
1448
1449   PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC              glDrawTransformFeedbackInstanced;
1450   PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC        glDrawTransformFeedbackStreamInstanced;
1451
1452 public: //! @name GL_ARB_internalformat_query (added to OpenGL 4.2 core)
1453
1454   PFNGLGETINTERNALFORMATIVPROC                         glGetInternalformativ;
1455
1456 public: //! @name GL_ARB_shader_atomic_counters (added to OpenGL 4.2 core)
1457
1458   PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC              glGetActiveAtomicCounterBufferiv;
1459
1460 public: //! @name GL_ARB_shader_image_load_store (added to OpenGL 4.2 core)
1461
1462   PFNGLBINDIMAGETEXTUREPROC                            glBindImageTexture;
1463   PFNGLMEMORYBARRIERPROC                               glMemoryBarrier;
1464
1465 public: //! @name GL_ARB_texture_storage (added to OpenGL 4.2 core)
1466
1467   PFNGLTEXSTORAGE1DPROC                                glTexStorage1D;
1468   PFNGLTEXSTORAGE2DPROC                                glTexStorage2D;
1469   PFNGLTEXSTORAGE3DPROC                                glTexStorage3D;
1470
1471 public: //! @name OpenGL 4.2
1472
1473 public: //! @name OpenGL 4.3
1474
1475   PFNGLCLEARBUFFERDATAPROC                 glClearBufferData;
1476   PFNGLCLEARBUFFERSUBDATAPROC              glClearBufferSubData;
1477   PFNGLDISPATCHCOMPUTEPROC                 glDispatchCompute;
1478   PFNGLDISPATCHCOMPUTEINDIRECTPROC         glDispatchComputeIndirect;
1479   PFNGLCOPYIMAGESUBDATAPROC                glCopyImageSubData;
1480   PFNGLFRAMEBUFFERPARAMETERIPROC           glFramebufferParameteri;
1481   PFNGLGETFRAMEBUFFERPARAMETERIVPROC       glGetFramebufferParameteriv;
1482   PFNGLGETINTERNALFORMATI64VPROC           glGetInternalformati64v;
1483   PFNGLINVALIDATETEXSUBIMAGEPROC           glInvalidateTexSubImage;
1484   PFNGLINVALIDATETEXIMAGEPROC              glInvalidateTexImage;
1485   PFNGLINVALIDATEBUFFERSUBDATAPROC         glInvalidateBufferSubData;
1486   PFNGLINVALIDATEBUFFERDATAPROC            glInvalidateBufferData;
1487   PFNGLINVALIDATEFRAMEBUFFERPROC           glInvalidateFramebuffer;
1488   PFNGLINVALIDATESUBFRAMEBUFFERPROC        glInvalidateSubFramebuffer;
1489   PFNGLMULTIDRAWARRAYSINDIRECTPROC         glMultiDrawArraysIndirect;
1490   PFNGLMULTIDRAWELEMENTSINDIRECTPROC       glMultiDrawElementsIndirect;
1491   PFNGLGETPROGRAMINTERFACEIVPROC           glGetProgramInterfaceiv;
1492   PFNGLGETPROGRAMRESOURCEINDEXPROC         glGetProgramResourceIndex;
1493   PFNGLGETPROGRAMRESOURCENAMEPROC          glGetProgramResourceName;
1494   PFNGLGETPROGRAMRESOURCEIVPROC            glGetProgramResourceiv;
1495   PFNGLGETPROGRAMRESOURCELOCATIONPROC      glGetProgramResourceLocation;
1496   PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glGetProgramResourceLocationIndex;
1497   PFNGLSHADERSTORAGEBLOCKBINDINGPROC       glShaderStorageBlockBinding;
1498   PFNGLTEXBUFFERRANGEPROC                  glTexBufferRange;
1499   PFNGLTEXSTORAGE2DMULTISAMPLEPROC         glTexStorage2DMultisample;
1500   PFNGLTEXSTORAGE3DMULTISAMPLEPROC         glTexStorage3DMultisample;
1501   PFNGLTEXTUREVIEWPROC                     glTextureView;
1502   PFNGLBINDVERTEXBUFFERPROC                glBindVertexBuffer;
1503   PFNGLVERTEXATTRIBFORMATPROC              glVertexAttribFormat;
1504   PFNGLVERTEXATTRIBIFORMATPROC             glVertexAttribIFormat;
1505   PFNGLVERTEXATTRIBLFORMATPROC             glVertexAttribLFormat;
1506   PFNGLVERTEXATTRIBBINDINGPROC             glVertexAttribBinding;
1507   PFNGLVERTEXBINDINGDIVISORPROC            glVertexBindingDivisor;
1508   PFNGLDEBUGMESSAGECONTROLPROC             glDebugMessageControl;
1509   PFNGLDEBUGMESSAGEINSERTPROC              glDebugMessageInsert;
1510   PFNGLDEBUGMESSAGECALLBACKPROC            glDebugMessageCallback;
1511   PFNGLGETDEBUGMESSAGELOGPROC              glGetDebugMessageLog;
1512   PFNGLPUSHDEBUGGROUPPROC                  glPushDebugGroup;
1513   PFNGLPOPDEBUGGROUPPROC                   glPopDebugGroup;
1514   PFNGLOBJECTLABELPROC                     glObjectLabel;
1515   PFNGLGETOBJECTLABELPROC                  glGetObjectLabel;
1516   PFNGLOBJECTPTRLABELPROC                  glObjectPtrLabel;
1517   PFNGLGETOBJECTPTRLABELPROC               glGetObjectPtrLabel;
1518
1519 public: //! @name OpenGL 4.4
1520
1521   PFNGLBUFFERSTORAGEPROC     glBufferStorage;
1522   PFNGLCLEARTEXIMAGEPROC     glClearTexImage;
1523   PFNGLCLEARTEXSUBIMAGEPROC  glClearTexSubImage;
1524   PFNGLBINDBUFFERSBASEPROC   glBindBuffersBase;
1525   PFNGLBINDBUFFERSRANGEPROC  glBindBuffersRange;
1526   PFNGLBINDTEXTURESPROC      glBindTextures;
1527   PFNGLBINDSAMPLERSPROC      glBindSamplers;
1528   PFNGLBINDIMAGETEXTURESPROC glBindImageTextures;
1529   PFNGLBINDVERTEXBUFFERSPROC glBindVertexBuffers;
1530
1531 public: //! @name OpenGL 4.5
1532
1533   PFNGLCLIPCONTROLPROC glClipControl;
1534   PFNGLCREATETRANSFORMFEEDBACKSPROC glCreateTransformFeedbacks;
1535   PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glTransformFeedbackBufferBase;
1536   PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glTransformFeedbackBufferRange;
1537   PFNGLGETTRANSFORMFEEDBACKIVPROC glGetTransformFeedbackiv;
1538   PFNGLGETTRANSFORMFEEDBACKI_VPROC glGetTransformFeedbacki_v;
1539   PFNGLGETTRANSFORMFEEDBACKI64_VPROC glGetTransformFeedbacki64_v;
1540   PFNGLCREATEBUFFERSPROC glCreateBuffers;
1541   PFNGLNAMEDBUFFERSTORAGEPROC glNamedBufferStorage;
1542   PFNGLNAMEDBUFFERDATAPROC glNamedBufferData;
1543   PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData;
1544   PFNGLCOPYNAMEDBUFFERSUBDATAPROC glCopyNamedBufferSubData;
1545   PFNGLCLEARNAMEDBUFFERDATAPROC glClearNamedBufferData;
1546   PFNGLCLEARNAMEDBUFFERSUBDATAPROC glClearNamedBufferSubData;
1547   PFNGLMAPNAMEDBUFFERPROC glMapNamedBuffer;
1548   PFNGLMAPNAMEDBUFFERRANGEPROC glMapNamedBufferRange;
1549   PFNGLUNMAPNAMEDBUFFERPROC glUnmapNamedBuffer;
1550   PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glFlushMappedNamedBufferRange;
1551   PFNGLGETNAMEDBUFFERPARAMETERIVPROC glGetNamedBufferParameteriv;
1552   PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glGetNamedBufferParameteri64v;
1553   PFNGLGETNAMEDBUFFERPOINTERVPROC glGetNamedBufferPointerv;
1554   PFNGLGETNAMEDBUFFERSUBDATAPROC glGetNamedBufferSubData;
1555   PFNGLCREATEFRAMEBUFFERSPROC glCreateFramebuffers;
1556   PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glNamedFramebufferRenderbuffer;
1557   PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glNamedFramebufferParameteri;
1558   PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glNamedFramebufferTexture;
1559   PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glNamedFramebufferTextureLayer;
1560   PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glNamedFramebufferDrawBuffer;
1561   PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glNamedFramebufferDrawBuffers;
1562   PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glNamedFramebufferReadBuffer;
1563   PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glInvalidateNamedFramebufferData;
1564   PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glInvalidateNamedFramebufferSubData;
1565   PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glClearNamedFramebufferiv;
1566   PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glClearNamedFramebufferuiv;
1567   PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glClearNamedFramebufferfv;
1568   PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glClearNamedFramebufferfi;
1569   PFNGLBLITNAMEDFRAMEBUFFERPROC glBlitNamedFramebuffer;
1570   PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glCheckNamedFramebufferStatus;
1571   PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glGetNamedFramebufferParameteriv;
1572   PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetNamedFramebufferAttachmentParameteriv;
1573   PFNGLCREATERENDERBUFFERSPROC glCreateRenderbuffers;
1574   PFNGLNAMEDRENDERBUFFERSTORAGEPROC glNamedRenderbufferStorage;
1575   PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glNamedRenderbufferStorageMultisample;
1576   PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glGetNamedRenderbufferParameteriv;
1577   PFNGLCREATETEXTURESPROC glCreateTextures;
1578   PFNGLTEXTUREBUFFERPROC glTextureBuffer;
1579   PFNGLTEXTUREBUFFERRANGEPROC glTextureBufferRange;
1580   PFNGLTEXTURESTORAGE1DPROC glTextureStorage1D;
1581   PFNGLTEXTURESTORAGE2DPROC glTextureStorage2D;
1582   PFNGLTEXTURESTORAGE3DPROC glTextureStorage3D;
1583   PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glTextureStorage2DMultisample;
1584   PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glTextureStorage3DMultisample;
1585   PFNGLTEXTURESUBIMAGE1DPROC glTextureSubImage1D;
1586   PFNGLTEXTURESUBIMAGE2DPROC glTextureSubImage2D;
1587   PFNGLTEXTURESUBIMAGE3DPROC glTextureSubImage3D;
1588   PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glCompressedTextureSubImage1D;
1589   PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glCompressedTextureSubImage2D;
1590   PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glCompressedTextureSubImage3D;
1591   PFNGLCOPYTEXTURESUBIMAGE1DPROC glCopyTextureSubImage1D;
1592   PFNGLCOPYTEXTURESUBIMAGE2DPROC glCopyTextureSubImage2D;
1593   PFNGLCOPYTEXTURESUBIMAGE3DPROC glCopyTextureSubImage3D;
1594   PFNGLTEXTUREPARAMETERFPROC glTextureParameterf;
1595   PFNGLTEXTUREPARAMETERFVPROC glTextureParameterfv;
1596   PFNGLTEXTUREPARAMETERIPROC glTextureParameteri;
1597   PFNGLTEXTUREPARAMETERIIVPROC glTextureParameterIiv;
1598   PFNGLTEXTUREPARAMETERIUIVPROC glTextureParameterIuiv;
1599   PFNGLTEXTUREPARAMETERIVPROC glTextureParameteriv;
1600   PFNGLGENERATETEXTUREMIPMAPPROC glGenerateTextureMipmap;
1601   PFNGLBINDTEXTUREUNITPROC glBindTextureUnit;
1602   PFNGLGETTEXTUREIMAGEPROC glGetTextureImage;
1603   PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glGetCompressedTextureImage;
1604   PFNGLGETTEXTURELEVELPARAMETERFVPROC glGetTextureLevelParameterfv;
1605   PFNGLGETTEXTURELEVELPARAMETERIVPROC glGetTextureLevelParameteriv;
1606   PFNGLGETTEXTUREPARAMETERFVPROC glGetTextureParameterfv;
1607   PFNGLGETTEXTUREPARAMETERIIVPROC glGetTextureParameterIiv;
1608   PFNGLGETTEXTUREPARAMETERIUIVPROC glGetTextureParameterIuiv;
1609   PFNGLGETTEXTUREPARAMETERIVPROC glGetTextureParameteriv;
1610   PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays;
1611   PFNGLDISABLEVERTEXARRAYATTRIBPROC glDisableVertexArrayAttrib;
1612   PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib;
1613   PFNGLVERTEXARRAYELEMENTBUFFERPROC glVertexArrayElementBuffer;
1614   PFNGLVERTEXARRAYVERTEXBUFFERPROC glVertexArrayVertexBuffer;
1615   PFNGLVERTEXARRAYVERTEXBUFFERSPROC glVertexArrayVertexBuffers;
1616   PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding;
1617   PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat;
1618   PFNGLVERTEXARRAYATTRIBIFORMATPROC glVertexArrayAttribIFormat;
1619   PFNGLVERTEXARRAYATTRIBLFORMATPROC glVertexArrayAttribLFormat;
1620   PFNGLVERTEXARRAYBINDINGDIVISORPROC glVertexArrayBindingDivisor;
1621   PFNGLGETVERTEXARRAYIVPROC glGetVertexArrayiv;
1622   PFNGLGETVERTEXARRAYINDEXEDIVPROC glGetVertexArrayIndexediv;
1623   PFNGLGETVERTEXARRAYINDEXED64IVPROC glGetVertexArrayIndexed64iv;
1624   PFNGLCREATESAMPLERSPROC glCreateSamplers;
1625   PFNGLCREATEPROGRAMPIPELINESPROC glCreateProgramPipelines;
1626   PFNGLCREATEQUERIESPROC glCreateQueries;
1627   PFNGLGETQUERYBUFFEROBJECTI64VPROC glGetQueryBufferObjecti64v;
1628   PFNGLGETQUERYBUFFEROBJECTIVPROC glGetQueryBufferObjectiv;
1629   PFNGLGETQUERYBUFFEROBJECTUI64VPROC glGetQueryBufferObjectui64v;
1630   PFNGLGETQUERYBUFFEROBJECTUIVPROC glGetQueryBufferObjectuiv;
1631   PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion;
1632   PFNGLGETTEXTURESUBIMAGEPROC glGetTextureSubImage;
1633   PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glGetCompressedTextureSubImage;
1634   PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus;
1635   PFNGLGETNCOMPRESSEDTEXIMAGEPROC glGetnCompressedTexImage;
1636   PFNGLGETNTEXIMAGEPROC glGetnTexImage;
1637   PFNGLGETNUNIFORMDVPROC glGetnUniformdv;
1638   PFNGLGETNUNIFORMFVPROC glGetnUniformfv;
1639   PFNGLGETNUNIFORMIVPROC glGetnUniformiv;
1640   PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv;
1641   PFNGLREADNPIXELSPROC glReadnPixels;
1642   PFNGLGETNMAPDVPROC glGetnMapdv;
1643   PFNGLGETNMAPFVPROC glGetnMapfv;
1644   PFNGLGETNMAPIVPROC glGetnMapiv;
1645   PFNGLGETNPIXELMAPFVPROC  glGetnPixelMapfv;
1646   PFNGLGETNPIXELMAPUIVPROC glGetnPixelMapuiv;
1647   PFNGLGETNPIXELMAPUSVPROC glGetnPixelMapusv;
1648   PFNGLGETNPOLYGONSTIPPLEPROC glGetnPolygonStipple;
1649   PFNGLGETNCOLORTABLEPROC glGetnColorTable;
1650   PFNGLGETNCONVOLUTIONFILTERPROC glGetnConvolutionFilter;
1651   PFNGLGETNSEPARABLEFILTERPROC glGetnSeparableFilter;
1652   PFNGLGETNHISTOGRAMPROC glGetnHistogram;
1653   PFNGLGETNMINMAXPROC glGetnMinmax;
1654   PFNGLTEXTUREBARRIERPROC glTextureBarrier;
1655
1656 public: //! @name GL_EXT_geometry_shader4
1657
1658   PFNGLPROGRAMPARAMETERIEXTPROC glProgramParameteriEXT;
1659
1660 public: //! @name GL_ARB_bindless_texture
1661
1662   PFNGLGETTEXTUREHANDLEARBPROC             glGetTextureHandleARB;
1663   PFNGLGETTEXTURESAMPLERHANDLEARBPROC      glGetTextureSamplerHandleARB;
1664   PFNGLMAKETEXTUREHANDLERESIDENTARBPROC    glMakeTextureHandleResidentARB;
1665   PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC glMakeTextureHandleNonResidentARB;
1666   PFNGLGETIMAGEHANDLEARBPROC               glGetImageHandleARB;
1667   PFNGLMAKEIMAGEHANDLERESIDENTARBPROC      glMakeImageHandleResidentARB;
1668   PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC   glMakeImageHandleNonResidentARB;
1669   PFNGLUNIFORMHANDLEUI64ARBPROC            glUniformHandleui64ARB;
1670   PFNGLUNIFORMHANDLEUI64VARBPROC           glUniformHandleui64vARB;
1671   PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC     glProgramUniformHandleui64ARB;
1672   PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC    glProgramUniformHandleui64vARB;
1673   PFNGLISTEXTUREHANDLERESIDENTARBPROC      glIsTextureHandleResidentARB;
1674   PFNGLISIMAGEHANDLERESIDENTARBPROC        glIsImageHandleResidentARB;
1675   PFNGLVERTEXATTRIBL1UI64ARBPROC           glVertexAttribL1ui64ARB;
1676   PFNGLVERTEXATTRIBL1UI64VARBPROC          glVertexAttribL1ui64vARB;
1677   PFNGLGETVERTEXATTRIBLUI64VARBPROC        glGetVertexAttribLui64vARB;
1678
1679 #if defined(_WIN32)
1680 public: //! @name wgl extensions
1681
1682   typedef const char* (WINAPI *wglGetExtensionsStringARB_t)(HDC theDeviceContext);
1683   wglGetExtensionsStringARB_t wglGetExtensionsStringARB;
1684
1685   typedef BOOL        (WINAPI *wglSwapIntervalEXT_t)(int theInterval);
1686   wglSwapIntervalEXT_t wglSwapIntervalEXT;
1687
1688   // WGL_ARB_pixel_format
1689
1690 #ifndef WGL_NUMBER_PIXEL_FORMATS_ARB
1691   #define WGL_NUMBER_PIXEL_FORMATS_ARB            0x2000
1692   #define WGL_DRAW_TO_WINDOW_ARB                  0x2001
1693   #define WGL_DRAW_TO_BITMAP_ARB                  0x2002
1694   #define WGL_ACCELERATION_ARB                    0x2003
1695   #define WGL_NEED_PALETTE_ARB                    0x2004
1696   #define WGL_NEED_SYSTEM_PALETTE_ARB             0x2005
1697   #define WGL_SWAP_LAYER_BUFFERS_ARB              0x2006
1698   #define WGL_SWAP_METHOD_ARB                     0x2007
1699   #define WGL_NUMBER_OVERLAYS_ARB                 0x2008
1700   #define WGL_NUMBER_UNDERLAYS_ARB                0x2009
1701   #define WGL_TRANSPARENT_ARB                     0x200A
1702   #define WGL_TRANSPARENT_RED_VALUE_ARB           0x2037
1703   #define WGL_TRANSPARENT_GREEN_VALUE_ARB         0x2038
1704   #define WGL_TRANSPARENT_BLUE_VALUE_ARB          0x2039
1705   #define WGL_TRANSPARENT_ALPHA_VALUE_ARB         0x203A
1706   #define WGL_TRANSPARENT_INDEX_VALUE_ARB         0x203B
1707   #define WGL_SHARE_DEPTH_ARB                     0x200C
1708   #define WGL_SHARE_STENCIL_ARB                   0x200D
1709   #define WGL_SHARE_ACCUM_ARB                     0x200E
1710   #define WGL_SUPPORT_GDI_ARB                     0x200F
1711   #define WGL_SUPPORT_OPENGL_ARB                  0x2010
1712   #define WGL_DOUBLE_BUFFER_ARB                   0x2011
1713   #define WGL_STEREO_ARB                          0x2012
1714   #define WGL_PIXEL_TYPE_ARB                      0x2013
1715   #define WGL_COLOR_BITS_ARB                      0x2014
1716   #define WGL_RED_BITS_ARB                        0x2015
1717   #define WGL_RED_SHIFT_ARB                       0x2016
1718   #define WGL_GREEN_BITS_ARB                      0x2017
1719   #define WGL_GREEN_SHIFT_ARB                     0x2018
1720   #define WGL_BLUE_BITS_ARB                       0x2019
1721   #define WGL_BLUE_SHIFT_ARB                      0x201A
1722   #define WGL_ALPHA_BITS_ARB                      0x201B
1723   #define WGL_ALPHA_SHIFT_ARB                     0x201C
1724   #define WGL_ACCUM_BITS_ARB                      0x201D
1725   #define WGL_ACCUM_RED_BITS_ARB                  0x201E
1726   #define WGL_ACCUM_GREEN_BITS_ARB                0x201F
1727   #define WGL_ACCUM_BLUE_BITS_ARB                 0x2020
1728   #define WGL_ACCUM_ALPHA_BITS_ARB                0x2021
1729   #define WGL_DEPTH_BITS_ARB                      0x2022
1730   #define WGL_STENCIL_BITS_ARB                    0x2023
1731   #define WGL_AUX_BUFFERS_ARB                     0x2024
1732
1733   #define WGL_NO_ACCELERATION_ARB                 0x2025
1734   #define WGL_GENERIC_ACCELERATION_ARB            0x2026
1735   #define WGL_FULL_ACCELERATION_ARB               0x2027
1736
1737   #define WGL_SWAP_EXCHANGE_ARB                   0x2028
1738   #define WGL_SWAP_COPY_ARB                       0x2029
1739   #define WGL_SWAP_UNDEFINED_ARB                  0x202A
1740
1741   #define WGL_TYPE_RGBA_ARB                       0x202B
1742   #define WGL_TYPE_COLORINDEX_ARB                 0x202C
1743
1744 #endif // WGL_NUMBER_PIXEL_FORMATS_ARB
1745
1746       // WGL_ARB_multisample
1747 #ifndef WGL_SAMPLE_BUFFERS_ARB
1748   #define WGL_SAMPLE_BUFFERS_ARB               0x2041
1749   #define WGL_SAMPLES_ARB                      0x2042
1750 #endif
1751
1752       // WGL_ARB_create_context_robustness
1753 #ifndef WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB
1754   #define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
1755   #define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
1756   #define WGL_NO_RESET_NOTIFICATION_ARB               0x8261
1757   #define WGL_LOSE_CONTEXT_ON_RESET_ARB               0x8252
1758 #endif
1759
1760   typedef BOOL (WINAPI *wglChoosePixelFormatARB_t)
1761       (HDC           theDevCtx,
1762        const int*    theIntAttribs,
1763        const float*  theFloatAttribs,
1764        unsigned int  theMaxFormats,
1765        int*          theFormatsOut,
1766        unsigned int* theNumFormatsOut);
1767   wglChoosePixelFormatARB_t wglChoosePixelFormatARB;
1768
1769   // WGL_ARB_create_context_profile
1770
1771 #ifndef WGL_CONTEXT_MAJOR_VERSION_ARB
1772   #define WGL_CONTEXT_MAJOR_VERSION_ARB           0x2091
1773   #define WGL_CONTEXT_MINOR_VERSION_ARB           0x2092
1774   #define WGL_CONTEXT_LAYER_PLANE_ARB             0x2093
1775   #define WGL_CONTEXT_FLAGS_ARB                   0x2094
1776   #define WGL_CONTEXT_PROFILE_MASK_ARB            0x9126
1777
1778   // WGL_CONTEXT_FLAGS bits
1779   #define WGL_CONTEXT_DEBUG_BIT_ARB               0x0001
1780   #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB  0x0002
1781
1782   // WGL_CONTEXT_PROFILE_MASK_ARB bits
1783   #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB          0x00000001
1784   #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
1785 #endif // WGL_CONTEXT_MAJOR_VERSION_ARB
1786
1787   typedef HGLRC (WINAPI *wglCreateContextAttribsARB_t)(HDC        theDevCtx,
1788                                                        HGLRC      theShareContext,
1789                                                        const int* theAttribs);
1790   wglCreateContextAttribsARB_t wglCreateContextAttribsARB;
1791
1792   // WGL_NV_DX_interop
1793
1794   typedef BOOL   (WINAPI *wglDXSetResourceShareHandleNV_t)(void* theObjectD3d, HANDLE theShareHandle);
1795   typedef HANDLE (WINAPI *wglDXOpenDeviceNV_t      )(void*   theDeviceD3d);
1796   typedef BOOL   (WINAPI *wglDXCloseDeviceNV_t     )(HANDLE  theDeviceIOP);
1797   typedef HANDLE (WINAPI *wglDXRegisterObjectNV_t  )(HANDLE  theDeviceIOP,
1798                                                      void*   theObjectD3d,
1799                                                      GLuint  theName,
1800                                                      GLenum  theType,
1801                                                      GLenum  theAccess);
1802   typedef BOOL   (WINAPI *wglDXUnregisterObjectNV_t)(HANDLE  theDeviceIOP,
1803                                                      HANDLE  theObject);
1804   typedef BOOL   (WINAPI *wglDXObjectAccessNV_t    )(HANDLE  theObject,
1805                                                      GLenum  theAccess);
1806   typedef BOOL   (WINAPI *wglDXLockObjectsNV_t     )(HANDLE  theDeviceIOP,
1807                                                      GLint   theCount,
1808                                                      HANDLE* theObjects);
1809   typedef BOOL   (WINAPI *wglDXUnlockObjectsNV_t   )(HANDLE  theDeviceIOP,
1810                                                      GLint   theCount,
1811                                                      HANDLE* theObjects);
1812
1813   wglDXSetResourceShareHandleNV_t wglDXSetResourceShareHandleNV;
1814   wglDXOpenDeviceNV_t       wglDXOpenDeviceNV;
1815   wglDXCloseDeviceNV_t      wglDXCloseDeviceNV;
1816   wglDXRegisterObjectNV_t   wglDXRegisterObjectNV;
1817   wglDXUnregisterObjectNV_t wglDXUnregisterObjectNV;
1818   wglDXObjectAccessNV_t     wglDXObjectAccessNV;
1819   wglDXLockObjectsNV_t      wglDXLockObjectsNV;
1820   wglDXUnlockObjectsNV_t    wglDXUnlockObjectsNV;
1821
1822 #ifndef WGL_ACCESS_READ_WRITE_NV
1823   #define WGL_ACCESS_READ_ONLY_NV     0x0000
1824   #define WGL_ACCESS_READ_WRITE_NV    0x0001
1825   #define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
1826 #endif
1827
1828   // WGL_AMD_gpu_association
1829
1830 #ifndef WGL_GPU_VENDOR_AMD
1831   #define WGL_GPU_VENDOR_AMD                 0x1F00
1832   #define WGL_GPU_RENDERER_STRING_AMD        0x1F01
1833   #define WGL_GPU_OPENGL_VERSION_STRING_AMD  0x1F02
1834   #define WGL_GPU_FASTEST_TARGET_GPUS_AMD    0x21A2
1835   #define WGL_GPU_RAM_AMD                    0x21A3
1836   #define WGL_GPU_CLOCK_AMD                  0x21A4
1837   #define WGL_GPU_NUM_PIPES_AMD              0x21A5
1838   #define WGL_GPU_NUM_SIMD_AMD               0x21A6
1839   #define WGL_GPU_NUM_RB_AMD                 0x21A7
1840   #define WGL_GPU_NUM_SPI_AMD                0x21A8
1841 #endif
1842
1843   typedef UINT (WINAPI *wglGetGPUIDsAMD_t       )(UINT theMaxCount, UINT* theIds);
1844   typedef INT  (WINAPI *wglGetGPUInfoAMD_t      )(UINT theId, INT theProperty, GLenum theDataType, UINT theSize, void* theData);
1845   typedef UINT (WINAPI *wglGetContextGPUIDAMD_t )(HGLRC theHglrc);
1846   wglGetGPUIDsAMD_t       wglGetGPUIDsAMD;
1847   wglGetGPUInfoAMD_t      wglGetGPUInfoAMD;
1848   wglGetContextGPUIDAMD_t wglGetContextGPUIDAMD;
1849
1850 #elif defined(__APPLE__)
1851 public: //! @name CGL extensions
1852
1853 #else
1854 public: //! @name glX extensions
1855
1856   // GLX_EXT_swap_control
1857   //typedef int         (*glXSwapIntervalEXT_t)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
1858   typedef int         (*glXSwapIntervalEXT_t)();
1859   glXSwapIntervalEXT_t glXSwapIntervalEXT;
1860
1861   typedef int         (*glXSwapIntervalSGI_t)(int theInterval);
1862   glXSwapIntervalSGI_t glXSwapIntervalSGI;
1863
1864   // GLX_MESA_query_renderer
1865 #ifndef GLX_RENDERER_VENDOR_ID_MESA
1866   // for glXQueryRendererIntegerMESA() and glXQueryCurrentRendererIntegerMESA()
1867   #define GLX_RENDERER_VENDOR_ID_MESA                      0x8183
1868   #define GLX_RENDERER_DEVICE_ID_MESA                      0x8184
1869   #define GLX_RENDERER_VERSION_MESA                        0x8185
1870   #define GLX_RENDERER_ACCELERATED_MESA                    0x8186
1871   #define GLX_RENDERER_VIDEO_MEMORY_MESA                   0x8187
1872   #define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA    0x8188
1873   #define GLX_RENDERER_PREFERRED_PROFILE_MESA              0x8189
1874   #define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA    0x818A
1875   #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
1876   #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA      0x818C
1877   #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA     0x818D
1878
1879   #define GLX_RENDERER_ID_MESA                             0x818E
1880 #endif // GLX_RENDERER_VENDOR_ID_MESA
1881
1882   typedef Bool (*glXQueryRendererIntegerMESA_t)(Display* theDisplay, int theScreen,
1883                                                 int theRenderer, int theAttribute,
1884                                                 unsigned int* theValue);
1885   typedef Bool (*glXQueryCurrentRendererIntegerMESA_t)(int theAttribute, unsigned int* theValue);
1886   typedef const char* (*glXQueryRendererStringMESA_t)(Display* theDisplay, int theScreen,
1887                                                       int theRenderer, int theAttribute);
1888   typedef const char* (*glXQueryCurrentRendererStringMESA_t)(int theAttribute);
1889
1890   glXQueryRendererIntegerMESA_t        glXQueryRendererIntegerMESA;
1891   glXQueryCurrentRendererIntegerMESA_t glXQueryCurrentRendererIntegerMESA;
1892   glXQueryRendererStringMESA_t         glXQueryRendererStringMESA;
1893   glXQueryCurrentRendererStringMESA_t  glXQueryCurrentRendererStringMESA;
1894 #endif
1895
1896 #endif // OpenGL ES vs. desktop
1897
1898 };
1899
1900 #endif // _OpenGl_GlFunctions_Header