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