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