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