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