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