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