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