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