LCOV - code coverage report
Current view: top level - source/lib/external_libraries - glext_funcs.h (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 0 216 0.0 %
Date: 2021-09-24 14:46:47 Functions: 0 0 -

          Line data    Source code
       1             : /* Copyright (C) 2021 Wildfire Games.
       2             :  *
       3             :  * Permission is hereby granted, free of charge, to any person obtaining
       4             :  * a copy of this software and associated documentation files (the
       5             :  * "Software"), to deal in the Software without restriction, including
       6             :  * without limitation the rights to use, copy, modify, merge, publish,
       7             :  * distribute, sublicense, and/or sell copies of the Software, and to
       8             :  * permit persons to whom the Software is furnished to do so, subject to
       9             :  * the following conditions:
      10             :  *
      11             :  * The above copyright notice and this permission notice shall be included
      12             :  * in all copies or substantial portions of the Software.
      13             :  *
      14             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
      15             :  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
      16             :  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
      17             :  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
      18             :  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
      19             :  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
      20             :  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      21             :  */
      22             : 
      23             : /*
      24             :  * OpenGL extension function declarations (X macros).
      25             :  */
      26             : 
      27             : #include "lib/config2.h" // CONFIG2_GLES
      28             : 
      29             : #if CONFIG2_GLES
      30             : # include <GLES2/gl2ext.h>
      31             : #elif OS_MACOSX
      32             : # include <OpenGL/glext.h>
      33             : #else
      34             : # include <GL/glext.h>
      35             : #endif
      36             : 
      37             : #if OS_WIN
      38             : # include <GL/wglext.h>
      39             : #endif
      40             : 
      41             : /*
      42             : 
      43             : FUNC is used for functions that are only extensions.
      44             : FUNC2 is used for functions that have been promoted to core features.
      45             : FUNC3 is used for functions that have been promoted to core features
      46             : but have slightly changed semantics and need to be referred to by their
      47             : core name instead of extension name.
      48             : 
      49             : The FUNC2/FUNC3 calls include the version of OpenGL in which the extension was promoted,
      50             : and the pre- and post-promotion names (e.g. "glBindBufferARB" vs "glBindBuffer").
      51             : 
      52             : If the GL driver is advertising a sufficiently high version, we load the promoted
      53             : name; otherwise we use the *ARB name. (The spec says:
      54             :     "GL implementations of such later revisions should continue to export the name
      55             :      strings of promoted extensions in the EXTENSIONS string, and continue to support
      56             :      the ARB-affixed versions of functions and enumerants as a transition aid."
      57             : but some drivers might be stupid/buggy and fail to do that, so we don't just use
      58             : the ARB names unconditionally.)
      59             : 
      60             : The names are made accessible to engine code only via the ARB name, to make it
      61             : obvious that care must be taken (i.e. by being certain that the extension is
      62             : actually supported).
      63             : 
      64             : */
      65             : 
      66             : #if CONFIG2_GLES
      67             : 
      68             : // some functions that are extensions in GL are core functions in GLES,
      69             : // so we should use them without the function pointer indirection
      70             : #define pglActiveTextureARB glActiveTexture
      71             : #define pglBlendColorEXT glBlendColor
      72             : #define pglBlendEquationEXT glBlendEquation
      73             : #define pglClientActiveTextureARB glClientActiveTexture
      74             : #define pglCompressedTexImage2DARB glCompressedTexImage2D
      75             : 
      76             : #define pglAttachObjectARB glAttachShader
      77             : #define pglBindAttribLocationARB glBindAttribLocation
      78             : #define pglCompileShaderARB glCompileShader
      79             : #define pglCreateProgramObjectARB glCreateProgram
      80             : #define pglCreateShaderObjectARB glCreateShader
      81             : #define pglDeleteProgram glDeleteProgram
      82             : #define pglDeleteShader glDeleteShader
      83             : #define pglDisableVertexAttribArrayARB glDisableVertexAttribArray
      84             : #define pglEnableVertexAttribArrayARB glEnableVertexAttribArray
      85             : #define pglGetActiveUniformARB glGetActiveUniform
      86             : #define pglGetProgramiv glGetProgramiv
      87             : #define pglGetProgramInfoLog glGetProgramInfoLog
      88             : #define pglGetShaderiv glGetShaderiv
      89             : #define pglGetShaderInfoLog glGetShaderInfoLog
      90             : #define pglGetUniformLocationARB glGetUniformLocation
      91             : #define pglLinkProgramARB glLinkProgram
      92             : #define pglShaderSourceARB glShaderSource
      93             : #define pglUniform1fARB glUniform1f
      94             : #define pglUniform2fARB glUniform2f
      95             : #define pglUniform3fARB glUniform3f
      96             : #define pglUniform4fARB glUniform4f
      97             : #define pglUniform1iARB glUniform1i
      98             : #define pglUniformMatrix4fvARB glUniformMatrix4fv
      99             : #define pglUseProgramObjectARB glUseProgram
     100             : #define pglVertexAttribPointerARB glVertexAttribPointer
     101             : 
     102             : #define pglBindBufferARB glBindBuffer
     103             : #define pglBufferDataARB glBufferData
     104             : #define pglBufferSubDataARB glBufferSubData
     105             : #define pglDeleteBuffersARB glDeleteBuffers
     106             : #define pglGenBuffersARB glGenBuffers
     107             : 
     108             : // Those EXT symbols don't exist in GLES 2.0, since it imported the ARB version instead.
     109             : #define pglBindFramebufferEXT glBindFramebuffer
     110             : #define pglCheckFramebufferStatusEXT glCheckFramebufferStatus
     111             : #define pglDeleteFramebuffersEXT glDeleteFramebuffers
     112             : #define pglFramebufferTexture2DEXT glFramebufferTexture2D
     113             : #define pglGenFramebuffersEXT glGenFramebuffers
     114             : #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING
     115             : #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE
     116             : #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER
     117             : 
     118             : // Those should come from GLES 2.0 core, not from GL_EXT_draw_buffers.
     119             : #ifndef GL_COLOR_ATTACHMENT0_EXT
     120             : #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
     121             : #define GL_COLOR_ATTACHMENT1_EXT GL_COLOR_ATTACHMENT1
     122             : #endif
     123             : #ifndef GL_DEPTH_ATTACHMENT_EXT
     124             : #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT
     125             : #endif
     126             : 
     127             : // GL_OES_mapbuffer
     128             : FUNC(GLvoid*, glMapBufferOES, (GLenum target, GLenum access))
     129             : FUNC(GLboolean, glUnmapBufferOES, (GLenum target))
     130             : #define pglMapBufferARB pglMapBufferOES
     131             : #define pglUnmapBufferARB pglUnmapBufferOES
     132             : #define GL_WRITE_ONLY GL_WRITE_ONLY_OES
     133             : 
     134             : // GL_OES_texture_border_clamp
     135             : #define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE
     136             : 
     137             : // GL_OES_rgb8_rgba8
     138             : #define GL_RGBA8 GL_RGBA8_OES
     139             : 
     140             : // GL_OES_depth32
     141             : #define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
     142             : 
     143             : typedef GLuint GLhandleARB;
     144             : 
     145             : #else
     146             : 
     147             : // We might not have multisample on macOS.
     148             : #ifndef GL_TEXTURE_2D_MULTISAMPLE
     149             : #define GL_TEXTURE_2D_MULTISAMPLE 0x9100
     150             : #endif
     151             : 
     152             : // were these defined as real functions in gl.h already?
     153             : 
     154             : // GL_EXT_draw_range_elements / GL1.2:
     155           0 : FUNC2(void, glDrawRangeElementsEXT, glDrawRangeElements, "1.2", (GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid*))
     156             : 
     157             : // GL_ARB_multitexture / GL1.3:
     158           0 : FUNC2(void, glMultiTexCoord2fARB, glMultiTexCoord2f, "1.3", (int, float, float))
     159           0 : FUNC2(void, glMultiTexCoord3fARB, glMultiTexCoord3f, "1.3", (int, float, float, float))
     160           0 : FUNC2(void, glActiveTextureARB, glActiveTexture, "1.3", (int))
     161           0 : FUNC2(void, glClientActiveTextureARB, glClientActiveTexture, "1.3", (int))
     162             : 
     163             : // GL_EXT_blend_color / GL1.4 (optional in 1.2):
     164           0 : FUNC2(void, glBlendColorEXT, glBlendColor, "1.4", (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
     165             : 
     166             : // GL_EXT_blend_minmax / GL1.4 (optional in 1.2):
     167           0 : FUNC2(void, glBlendEquationEXT, glBlendEquation, "1.4", (GLenum mode))
     168             : 
     169             : // GL_ARB_vertex_buffer_object / GL1.5:
     170           0 : FUNC2(void, glBindBufferARB, glBindBuffer, "1.5", (int target, GLuint buffer))
     171           0 : FUNC2(void, glDeleteBuffersARB, glDeleteBuffers, "1.5", (GLsizei n, const GLuint* buffers))
     172           0 : FUNC2(void, glGenBuffersARB, glGenBuffers, "1.5", (GLsizei n, GLuint* buffers))
     173           0 : FUNC2(bool, glIsBufferARB, glIsBuffer, "1.5", (GLuint buffer))
     174           0 : FUNC2(void, glBufferDataARB, glBufferData, "1.5", (int target, GLsizeiptrARB size, const void* data, int usage))
     175           0 : FUNC2(void, glBufferSubDataARB, glBufferSubData, "1.5", (int target, GLintptrARB offset, GLsizeiptrARB size, const void* data))
     176           0 : FUNC2(void, glGetBufferSubDataARB, glGetBufferSubData, "1.5", (int target, GLintptrARB offset, GLsizeiptrARB size, void* data))
     177           0 : FUNC2(void*, glMapBufferARB, glMapBuffer, "1.5", (int target, int access))
     178           0 : FUNC2(bool, glUnmapBufferARB, glUnmapBuffer, "1.5", (int target))
     179           0 : FUNC2(void, glGetBufferParameterivARB, glGetBufferParameteriv, "1.5", (int target, int pname, int* params))
     180           0 : FUNC2(void, glGetBufferPointervARB, glGetBufferPointerv, "1.5", (int target, int pname, void** params))
     181             : 
     182             : // GL_ARB_texture_compression / GL1.3
     183           0 : FUNC2(void, glCompressedTexImage3DARB, glCompressedTexImage3D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))
     184           0 : FUNC2(void, glCompressedTexImage2DARB, glCompressedTexImage2D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))
     185           0 : FUNC2(void, glCompressedTexImage1DARB, glCompressedTexImage1D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*))
     186           0 : FUNC2(void, glCompressedTexSubImage3DARB, glCompressedTexSubImage3D, "1.3", (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))
     187           0 : FUNC2(void, glCompressedTexSubImage2DARB, glCompressedTexSubImage2D, "1.3", (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))
     188           0 : FUNC2(void, glCompressedTexSubImage1DARB, glCompressedTexSubImage1D, "1.3", (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*))
     189           0 : FUNC2(void, glGetCompressedTexImageARB, glGetCompressedTexImage, "1.3", (GLenum, GLint, GLvoid*))
     190             : 
     191             : // GL_EXT_framebuffer_object
     192           0 : FUNC(GLboolean, glIsRenderbufferEXT, (GLuint renderbuffer))
     193           0 : FUNC(void, glBindRenderbufferEXT, (GLenum target, GLuint renderbuffer))
     194           0 : FUNC(void, glDeleteRenderbuffersEXT, (GLsizei n, const GLuint *renderbuffers))
     195           0 : FUNC(void, glGenRenderbuffersEXT, (GLsizei n, GLuint *renderbuffers))
     196           0 : FUNC(void, glRenderbufferStorageEXT, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height))
     197           0 : FUNC(void, glGetRenderbufferParameterivEXT, (GLenum target, GLenum pname, GLint *params))
     198           0 : FUNC(GLboolean, glIsFramebufferEXT, (GLuint framebuffer))
     199           0 : FUNC(void, glBindFramebufferEXT, (GLenum target, GLuint framebuffer))
     200           0 : FUNC(void, glDeleteFramebuffersEXT, (GLsizei n, const GLuint *framebuffers))
     201           0 : FUNC(void, glGenFramebuffersEXT, (GLsizei n, GLuint *framebuffers))
     202           0 : FUNC(GLenum, glCheckFramebufferStatusEXT, (GLenum target))
     203           0 : FUNC(void, glFramebufferTexture1DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level))
     204           0 : FUNC(void, glFramebufferTexture2DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level))
     205           0 : FUNC(void, glFramebufferTexture3DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset))
     206           0 : FUNC(void, glFramebufferRenderbufferEXT, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer))
     207           0 : FUNC(void, glGetFramebufferAttachmentParameterivEXT, (GLenum target, GLenum attachment, GLenum pname, GLint *params))
     208           0 : FUNC(void, glGenerateMipmapEXT, (GLenum target))
     209           0 : FUNC(void, glBlitFramebufferEXT, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter))
     210           0 : FUNC(void, glDrawBuffers, (GLsizei n, const GLenum *bufs))
     211             : 
     212             : // GL_ARB_vertex_program, GL_ARB_fragment_program
     213           0 : FUNC(void, glProgramStringARB, (GLenum target, GLenum format, GLsizei len, const GLvoid *string))
     214           0 : FUNC(void, glBindProgramARB, (GLenum target, GLuint program))
     215           0 : FUNC(void, glDeleteProgramsARB, (GLsizei n, const GLuint *programs))
     216           0 : FUNC(void, glGenProgramsARB, (GLsizei n, GLuint *programs))
     217           0 : FUNC(void, glProgramEnvParameter4dARB, (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
     218           0 : FUNC(void, glProgramEnvParameter4dvARB, (GLenum target, GLuint index, const GLdouble *params))
     219           0 : FUNC(void, glProgramEnvParameter4fARB, (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
     220           0 : FUNC(void, glProgramEnvParameter4fvARB, (GLenum target, GLuint index, const GLfloat *params))
     221           0 : FUNC(void, glProgramLocalParameter4dARB, (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
     222           0 : FUNC(void, glProgramLocalParameter4dvARB, (GLenum target, GLuint index, const GLdouble *params))
     223           0 : FUNC(void, glProgramLocalParameter4fARB, (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
     224           0 : FUNC(void, glProgramLocalParameter4fvARB, (GLenum target, GLuint index, const GLfloat *params))
     225           0 : FUNC(void, glGetProgramEnvParameterdvARB, (GLenum target, GLuint index, GLdouble *params))
     226           0 : FUNC(void, glGetProgramEnvParameterfvARB, (GLenum target, GLuint index, GLfloat *params))
     227           0 : FUNC(void, glGetProgramLocalParameterdvARB, (GLenum target, GLuint index, GLdouble *params))
     228           0 : FUNC(void, glGetProgramLocalParameterfvARB, (GLenum target, GLuint index, GLfloat *params))
     229           0 : FUNC(void, glGetProgramivARB, (GLenum target, GLenum pname, GLint *params))
     230           0 : FUNC(void, glGetProgramStringARB, (GLenum target, GLenum pname, GLvoid *string))
     231           0 : FUNC(GLboolean, glIsProgramARB, (GLuint program))
     232             : 
     233             : // GL_ARB_shader_objects
     234             : // (NOTE: Many of these have "Object" in their ARB names, but "Program" or "Shader" in their core names.
     235             : // When both Program and Shader versions exist, we use FUNC3 here and the engine must call the specific
     236             : // core name instead of the generic ARB name.)
     237           0 : FUNC3(void, glDeleteObjectARB, glDeleteShader, "2.0", (GLhandleARB obj))
     238           0 : FUNC3(void, glDeleteObjectARB, glDeleteProgram, "2.0", (GLhandleARB obj))
     239             : // FUNC2(GLhandleARB, glGetHandleARB, glGetHandle, "2.0", (GLenum pname))
     240             :   // there is no analog to the ARB function in GL 2.0 (the functionality is probably moved into glGetIntegerv(GL_CURRENT_PROGRAM))
     241             :   // so we can't represent it in this FUNC2 system, so just pretend it doesn't exist
     242           0 : FUNC2(void, glDetachObjectARB, glDetachShader, "2.0", (GLhandleARB containerObj, GLhandleARB attachedObj))
     243           0 : FUNC2(GLhandleARB, glCreateShaderObjectARB, glCreateShader, "2.0", (GLenum shaderType))
     244           0 : FUNC2(void, glShaderSourceARB, glShaderSource, "2.0", (GLhandleARB shaderObj, GLsizei count, const char **string, const GLint *length))
     245           0 : FUNC2(void, glCompileShaderARB, glCompileShader, "2.0", (GLhandleARB shaderObj))
     246           0 : FUNC2(GLhandleARB, glCreateProgramObjectARB, glCreateProgram, "2.0", (void))
     247           0 : FUNC2(void, glAttachObjectARB, glAttachShader, "2.0", (GLhandleARB containerObj, GLhandleARB obj))
     248           0 : FUNC2(void, glLinkProgramARB, glLinkProgram, "2.0", (GLhandleARB programObj))
     249           0 : FUNC2(void, glUseProgramObjectARB, glUseProgram, "2.0", (GLhandleARB programObj))
     250           0 : FUNC2(void, glValidateProgramARB, glValidateProgram, "2.0", (GLhandleARB programObj))
     251           0 : FUNC2(void, glUniform1fARB, glUniform1f, "2.0", (GLint location, GLfloat v0))
     252           0 : FUNC2(void, glUniform2fARB, glUniform2f, "2.0", (GLint location, GLfloat v0, GLfloat v1))
     253           0 : FUNC2(void, glUniform3fARB, glUniform3f, "2.0", (GLint location, GLfloat v0, GLfloat v1, GLfloat v2))
     254           0 : FUNC2(void, glUniform4fARB, glUniform4f, "2.0", (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
     255           0 : FUNC2(void, glUniform1iARB, glUniform1i, "2.0", (GLint location, GLint v0))
     256           0 : FUNC2(void, glUniform2iARB, glUniform2i, "2.0", (GLint location, GLint v0, GLint v1))
     257           0 : FUNC2(void, glUniform3iARB, glUniform3i, "2.0", (GLint location, GLint v0, GLint v1, GLint v2))
     258           0 : FUNC2(void, glUniform4iARB, glUniform4i, "2.0", (GLint location, GLint v0, GLint v1, GLint v2, GLint v3))
     259           0 : FUNC2(void, glUniform1fvARB, glUniform1fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
     260           0 : FUNC2(void, glUniform2fvARB, glUniform2fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
     261           0 : FUNC2(void, glUniform3fvARB, glUniform3fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
     262           0 : FUNC2(void, glUniform4fvARB, glUniform4fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
     263           0 : FUNC2(void, glUniform1ivARB, glUniform1iv, "2.0", (GLint location, GLsizei count, const GLint *value))
     264           0 : FUNC2(void, glUniform2ivARB, glUniform2iv, "2.0", (GLint location, GLsizei count, const GLint *value))
     265           0 : FUNC2(void, glUniform3ivARB, glUniform3iv, "2.0", (GLint location, GLsizei count, const GLint *value))
     266           0 : FUNC2(void, glUniform4ivARB, glUniform4iv, "2.0", (GLint location, GLsizei count, const GLint *value))
     267           0 : FUNC2(void, glUniformMatrix2fvARB, glUniformMatrix2fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
     268           0 : FUNC2(void, glUniformMatrix3fvARB, glUniformMatrix3fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
     269           0 : FUNC2(void, glUniformMatrix4fvARB, glUniformMatrix4fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
     270           0 : FUNC3(void, glGetObjectParameterfvARB, glGetProgramfv, "2.0", (GLhandleARB obj, GLenum pname, GLfloat *params))
     271           0 : FUNC3(void, glGetObjectParameterfvARB, glGetShaderfv, "2.0", (GLhandleARB obj, GLenum pname, GLfloat *params))
     272           0 : FUNC3(void, glGetObjectParameterivARB, glGetProgramiv, "2.0", (GLhandleARB obj, GLenum pname, GLint *params))
     273           0 : FUNC3(void, glGetObjectParameterivARB, glGetShaderiv, "2.0", (GLhandleARB obj, GLenum pname, GLint *params))
     274           0 : FUNC3(void, glGetInfoLogARB, glGetProgramInfoLog, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, char *infoLog))
     275           0 : FUNC3(void, glGetInfoLogARB, glGetShaderInfoLog, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, char *infoLog))
     276           0 : FUNC2(void, glGetAttachedObjectsARB, glGetAttachedShaders, "2.0", (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj))
     277           0 : FUNC2(GLint, glGetUniformLocationARB, glGetUniformLocation, "2.0", (GLhandleARB programObj, const char *name))
     278           0 : FUNC2(void, glGetActiveUniformARB, glGetActiveUniform, "2.0", (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, char *name))
     279           0 : FUNC2(void, glGetUniformfvARB, glGetUniformfv, "2.0", (GLhandleARB programObj, GLint location, GLfloat *params))
     280           0 : FUNC2(void, glGetUniformivARB, glGetUniformiv, "2.0", (GLhandleARB programObj, GLint location, GLint *params))
     281           0 : FUNC2(void, glGetShaderSourceARB, glGetShaderSource, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source))
     282             : 
     283             : // GL_ARB_vertex_shader
     284           0 : FUNC2(void, glVertexAttrib1fARB, glVertexAttrib1f, "2.0", (GLuint index, GLfloat v0))
     285           0 : FUNC2(void, glVertexAttrib1sARB, glVertexAttrib1s, "2.0", (GLuint index, GLshort v0))
     286           0 : FUNC2(void, glVertexAttrib1dARB, glVertexAttrib1d, "2.0", (GLuint index, GLdouble v0))
     287           0 : FUNC2(void, glVertexAttrib2fARB, glVertexAttrib2f, "2.0", (GLuint index, GLfloat v0, GLfloat v1))
     288           0 : FUNC2(void, glVertexAttrib2sARB, glVertexAttrib2s, "2.0", (GLuint index, GLshort v0, GLshort v1))
     289           0 : FUNC2(void, glVertexAttrib2dARB, glVertexAttrib2d, "2.0", (GLuint index, GLdouble v0, GLdouble v1))
     290           0 : FUNC2(void, glVertexAttrib3fARB, glVertexAttrib3f, "2.0", (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2))
     291           0 : FUNC2(void, glVertexAttrib3sARB, glVertexAttrib3s, "2.0", (GLuint index, GLshort v0, GLshort v1, GLshort v2))
     292           0 : FUNC2(void, glVertexAttrib3dARB, glVertexAttrib3d, "2.0", (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2))
     293           0 : FUNC2(void, glVertexAttrib4fARB, glVertexAttrib4f, "2.0", (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
     294           0 : FUNC2(void, glVertexAttrib4sARB, glVertexAttrib4s, "2.0", (GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3))
     295           0 : FUNC2(void, glVertexAttrib4dARB, glVertexAttrib4d, "2.0", (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3))
     296           0 : FUNC2(void, glVertexAttrib4NubARB, glVertexAttrib4Nub, "2.0", (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w))
     297           0 : FUNC2(void, glVertexAttrib1fvARB, glVertexAttrib1fv, "2.0", (GLuint index, const GLfloat *v))
     298           0 : FUNC2(void, glVertexAttrib1svARB, glVertexAttrib1sv, "2.0", (GLuint index, const GLshort *v))
     299           0 : FUNC2(void, glVertexAttrib1dvARB, glVertexAttrib1dv, "2.0", (GLuint index, const GLdouble *v))
     300           0 : FUNC2(void, glVertexAttrib2fvARB, glVertexAttrib2fv, "2.0", (GLuint index, const GLfloat *v))
     301           0 : FUNC2(void, glVertexAttrib2svARB, glVertexAttrib2sv, "2.0", (GLuint index, const GLshort *v))
     302           0 : FUNC2(void, glVertexAttrib2dvARB, glVertexAttrib2dv, "2.0", (GLuint index, const GLdouble *v))
     303           0 : FUNC2(void, glVertexAttrib3fvARB, glVertexAttrib3fv, "2.0", (GLuint index, const GLfloat *v))
     304           0 : FUNC2(void, glVertexAttrib3svARB, glVertexAttrib3sv, "2.0", (GLuint index, const GLshort *v))
     305           0 : FUNC2(void, glVertexAttrib3dvARB, glVertexAttrib3dv, "2.0", (GLuint index, const GLdouble *v))
     306           0 : FUNC2(void, glVertexAttrib4fvARB, glVertexAttrib4fv, "2.0", (GLuint index, const GLfloat *v))
     307           0 : FUNC2(void, glVertexAttrib4svARB, glVertexAttrib4sv, "2.0", (GLuint index, const GLshort *v))
     308           0 : FUNC2(void, glVertexAttrib4dvARB, glVertexAttrib4dv, "2.0", (GLuint index, const GLdouble *v))
     309           0 : FUNC2(void, glVertexAttrib4ivARB, glVertexAttrib4iv, "2.0", (GLuint index, const GLint *v))
     310           0 : FUNC2(void, glVertexAttrib4bvARB, glVertexAttrib4bv, "2.0", (GLuint index, const GLbyte *v))
     311           0 : FUNC2(void, glVertexAttrib4ubvARB, glVertexAttrib4ubv, "2.0", (GLuint index, const GLubyte *v))
     312           0 : FUNC2(void, glVertexAttrib4usvARB, glVertexAttrib4usv, "2.0", (GLuint index, const GLushort *v))
     313           0 : FUNC2(void, glVertexAttrib4uivARB, glVertexAttrib4uiv, "2.0", (GLuint index, const GLuint *v))
     314           0 : FUNC2(void, glVertexAttrib4NbvARB, glVertexAttrib4Nbv, "2.0", (GLuint index, const GLbyte *v))
     315           0 : FUNC2(void, glVertexAttrib4NsvARB, glVertexAttrib4Nsv, "2.0", (GLuint index, const GLshort *v))
     316           0 : FUNC2(void, glVertexAttrib4NivARB, glVertexAttrib4Niv, "2.0", (GLuint index, const GLint *v))
     317           0 : FUNC2(void, glVertexAttrib4NubvARB, glVertexAttrib4Nubv, "2.0", (GLuint index, const GLubyte *v))
     318           0 : FUNC2(void, glVertexAttrib4NusvARB, glVertexAttrib4Nusv, "2.0", (GLuint index, const GLushort *v))
     319           0 : FUNC2(void, glVertexAttrib4NuivARB, glVertexAttrib4Nuiv, "2.0", (GLuint index, const GLuint *v))
     320           0 : FUNC2(void, glVertexAttribPointerARB, glVertexAttribPointer, "2.0", (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer))
     321           0 : FUNC2(void, glEnableVertexAttribArrayARB, glEnableVertexAttribArray, "2.0", (GLuint index))
     322           0 : FUNC2(void, glDisableVertexAttribArrayARB, glDisableVertexAttribArray, "2.0", (GLuint index))
     323           0 : FUNC2(void, glBindAttribLocationARB, glBindAttribLocation, "2.0", (GLhandleARB programObj, GLuint index, const char *name))
     324           0 : FUNC2(void, glGetActiveAttribARB, glGetActiveAttrib, "2.0", (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, int *size, GLenum *type, char *name))
     325           0 : FUNC2(GLint, glGetAttribLocationARB, glGetAttribLocation, "2.0", (GLhandleARB programObj, const char *name))
     326           0 : FUNC2(void, glGetVertexAttribdvARB, glGetVertexAttribdv, "2.0", (GLuint index, GLenum pname, GLdouble *params))
     327           0 : FUNC2(void, glGetVertexAttribfvARB, glGetVertexAttribfv, "2.0", (GLuint index, GLenum pname, GLfloat *params))
     328           0 : FUNC2(void, glGetVertexAttribivARB, glGetVertexAttribiv, "2.0", (GLuint index, GLenum pname, GLint *params))
     329           0 : FUNC2(void, glGetVertexAttribPointervARB, glGetVertexAttribPointerv, "2.0", (GLuint index, GLenum pname, void **pointer))
     330             : 
     331             : // GL_EXT_gpu_shader4 / GL3.0:
     332           0 : FUNC2(void, glVertexAttribI1iEXT, glVertexAttribI1i, "3.0", (GLuint index, GLint x))
     333           0 : FUNC2(void, glVertexAttribI2iEXT, glVertexAttribI2i, "3.0", (GLuint index, GLint x, GLint y))
     334           0 : FUNC2(void, glVertexAttribI3iEXT, glVertexAttribI3i, "3.0", (GLuint index, GLint x, GLint y, GLint z))
     335           0 : FUNC2(void, glVertexAttribI4iEXT, glVertexAttribI4i, "3.0", (GLuint index, GLint x, GLint y, GLint z, GLint w))
     336           0 : FUNC2(void, glVertexAttribI1uiEXT, glVertexAttribI1ui, "3.0", (GLuint index, GLuint x))
     337           0 : FUNC2(void, glVertexAttribI2uiEXT, glVertexAttribI2ui, "3.0", (GLuint index, GLuint x, GLuint y))
     338           0 : FUNC2(void, glVertexAttribI3uiEXT, glVertexAttribI3ui, "3.0", (GLuint index, GLuint x, GLuint y, GLuint z))
     339           0 : FUNC2(void, glVertexAttribI4uiEXT, glVertexAttribI4ui, "3.0", (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w))
     340           0 : FUNC2(void, glVertexAttribI1ivEXT, glVertexAttribI1iv, "3.0", (GLuint index, const GLint *v))
     341           0 : FUNC2(void, glVertexAttribI2ivEXT, glVertexAttribI2iv, "3.0", (GLuint index, const GLint *v))
     342           0 : FUNC2(void, glVertexAttribI3ivEXT, glVertexAttribI3iv, "3.0", (GLuint index, const GLint *v))
     343           0 : FUNC2(void, glVertexAttribI4ivEXT, glVertexAttribI4iv, "3.0", (GLuint index, const GLint *v))
     344           0 : FUNC2(void, glVertexAttribI1uivEXT, glVertexAttribI1uiv, "3.0", (GLuint index, const GLuint *v))
     345           0 : FUNC2(void, glVertexAttribI2uivEXT, glVertexAttribI2uiv, "3.0", (GLuint index, const GLuint *v))
     346           0 : FUNC2(void, glVertexAttribI3uivEXT, glVertexAttribI3uiv, "3.0", (GLuint index, const GLuint *v))
     347           0 : FUNC2(void, glVertexAttribI4uivEXT, glVertexAttribI4uiv, "3.0", (GLuint index, const GLuint *v))
     348           0 : FUNC2(void, glVertexAttribI4bvEXT, glVertexAttribI4bv, "3.0", (GLuint index, const GLbyte *v))
     349           0 : FUNC2(void, glVertexAttribI4svEXT, glVertexAttribI4sv, "3.0", (GLuint index, const GLshort *v))
     350           0 : FUNC2(void, glVertexAttribI4ubvEXT, glVertexAttribI4ubv, "3.0", (GLuint index, const GLubyte *v))
     351           0 : FUNC2(void, glVertexAttribI4usvEXT, glVertexAttribI4usv, "3.0", (GLuint index, const GLushort *v))
     352           0 : FUNC2(void, glVertexAttribIPointerEXT, glVertexAttribIPointer, "3.0", (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer))
     353           0 : FUNC2(void, glGetVertexAttribIivEXT, glGetVertexAttribIiv, "3.0", (GLuint index, GLenum pname, GLint *params))
     354           0 : FUNC2(void, glGetVertexAttribIuivEXT, glGetVertexAttribIuiv, "3.0", (GLuint index, GLenum pname, GLuint *params))
     355           0 : FUNC2(void, glUniform1uiEXT, glUniform1ui, "3.0", (GLint location, GLuint v0))
     356           0 : FUNC2(void, glUniform2uiEXT, glUniform2ui, "3.0", (GLint location, GLuint v0, GLuint v1))
     357           0 : FUNC2(void, glUniform3uiEXT, glUniform3ui, "3.0", (GLint location, GLuint v0, GLuint v1, GLuint v2))
     358           0 : FUNC2(void, glUniform4uiEXT, glUniform4ui, "3.0", (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3))
     359           0 : FUNC2(void, glUniform1uivEXT, glUniform1uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
     360           0 : FUNC2(void, glUniform2uivEXT, glUniform2uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
     361           0 : FUNC2(void, glUniform3uivEXT, glUniform3uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
     362           0 : FUNC2(void, glUniform4uivEXT, glUniform4uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
     363           0 : FUNC2(void, glGetUniformuivEXT, glGetUniformuiv, "3.0", (GLuint program, GLint location, GLuint *params))
     364           0 : FUNC2(void, glBindFragDataLocationEXT, glBindFragDataLocation, "3.0", (GLuint program, GLuint colorNumber, const char *name))
     365           0 : FUNC2(GLint, glGetFragDataLocationEXT, glGetFragDataLocation, "3.0", (GLuint program, const char *name))
     366             : 
     367             : // GL_ARB_occlusion_query / GL1.5:
     368           0 : FUNC2(void, glGenQueriesARB, glGenQueries, "1.5", (GLsizei n, GLuint *ids))
     369           0 : FUNC2(void, glDeleteQueriesARB, glDeleteQueries, "1.5", (GLsizei n, const GLuint *ids))
     370           0 : FUNC2(GLboolean, glIsQueryARB, glIsQuery, "1.5", (GLuint id))
     371           0 : FUNC2(void, glBeginQueryARB, glBeginQuery, "1.5", (GLenum target, GLuint id))
     372           0 : FUNC2(void, glEndQueryARB, glEndQuery, "1.5", (GLenum target))
     373           0 : FUNC2(void, glGetQueryivARB, glGetQueryiv, "1.5", (GLenum target, GLenum pname, GLint *params))
     374           0 : FUNC2(void, glGetQueryObjectivARB, glGetQueryObjectiv, "1.5", (GLuint id, GLenum pname, GLint *params))
     375           0 : FUNC2(void, glGetQueryObjectuivARB, glGetQueryObjectuiv, "1.5", (GLuint id, GLenum pname, GLuint *params))
     376             : 
     377             : // GL_ARB_sync / GL3.2:
     378           0 : FUNC2(void, glGetInteger64v, glGetInteger64v, "3.2", (GLenum pname, GLint64 *params))
     379             : 
     380             : // GL_EXT_timer_query:
     381           0 : FUNC(void, glGetQueryObjecti64vEXT, (GLuint id, GLenum pname, GLint64 *params))
     382           0 : FUNC(void, glGetQueryObjectui64vEXT, (GLuint id, GLenum pname, GLuint64 *params))
     383             : 
     384             : // GL_ARB_timer_query / GL3.3:
     385           0 : FUNC2(void, glQueryCounter, glQueryCounter, "3.3", (GLuint id, GLenum target))
     386           0 : FUNC2(void, glGetQueryObjecti64v, glGetQueryObjecti64v, "3.3", (GLuint id, GLenum pname, GLint64 *params))
     387           0 : FUNC2(void, glGetQueryObjectui64v, glGetQueryObjectui64v, "3.3", (GLuint id, GLenum pname, GLuint64 *params))
     388             : 
     389             : // GL_ARB_map_buffer_range / GL3.0:
     390           0 : FUNC2(void*, glMapBufferRange, glMapBufferRange, "3.0", (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access))
     391           0 : FUNC2(void, glFlushMappedBufferRange, glFlushMappedBufferRange, "3.0", (GLenum target, GLintptr offset, GLsizeiptr length))
     392             : 
     393             : // GL_ARB_texture_multisample  / GL3.3:
     394           0 : FUNC2(void, glTexImage2DMultisample, glTexImage2DMultisample, "3.3", (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations))
     395             : 
     396             : // GL_GREMEDY_string_marker (from gDEBugger)
     397           0 : FUNC(int, glStringMarkerGREMEDY, (GLsizei len, const GLvoid *string))
     398             : 
     399             : // GL_INTEL_performance_queries (undocumented, may be unstable, use at own risk;
     400             : // see http://zaynar.co.uk/docs/gl-intel-performance-queries.html)
     401           0 : FUNC(void, glGetFirstPerfQueryIdINTEL, (GLuint *queryId))
     402           0 : FUNC(void, glGetNextPerfQueryIdINTEL, (GLuint prevQueryId, GLuint *queryId))
     403           0 : FUNC(void, glGetPerfQueryInfoINTEL, (GLuint queryId, GLuint nameMaxLength, char *name, GLuint *counterBufferSize, GLuint *numCounters, GLuint *maxQueries, GLuint *))
     404           0 : FUNC(void, glGetPerfCounterInfoINTEL, (GLuint queryId, GLuint counterId, GLuint nameMaxLength, char *name, GLuint descMaxLength, char *desc, GLuint *offset, GLuint *size, GLuint *usage, GLuint *type, GLuint64 *))
     405           0 : FUNC(void, glCreatePerfQueryINTEL, (GLuint queryId, GLuint *id))
     406           0 : FUNC(void, glBeginPerfQueryINTEL, (GLuint id))
     407           0 : FUNC(void, glEndPerfQueryINTEL, (GLuint id))
     408           0 : FUNC(void, glDeletePerfQueryINTEL, (GLuint id))
     409           0 : FUNC(void, glGetPerfQueryDataINTEL, (GLuint id, GLenum requestType, GLuint maxLength, char *buffer, GLuint *length))
     410             : 
     411             : #endif  // #if CONFIG_GLES2
     412             : 
     413             : 
     414             : #if OS_WIN
     415             : // WGL_EXT_swap_control
     416             : FUNC(int, wglSwapIntervalEXT, (int))
     417             : 
     418             : // WGL_ARB_pbuffer
     419             : FUNC(HPBUFFERARB, wglCreatePbufferARB, (HDC, int, int, int, const int*))
     420             : FUNC(HDC, wglGetPbufferDCARB, (HPBUFFERARB))
     421             : FUNC(int, wglReleasePbufferDCARB, (HPBUFFERARB, HDC))
     422             : FUNC(int, wglDestroyPbufferARB, (HPBUFFERARB))
     423             : FUNC(int, wglQueryPbufferARB, (HPBUFFERARB, int, int*))
     424             : 
     425             : // GL_ARB_pixel_format
     426             : FUNC(int, wglGetPixelFormatAttribivARB, (HDC, int, int, unsigned int, const int*, int*))
     427             : FUNC(int, wglGetPixelFormatAttribfvARB, (HDC, int, int, unsigned int, const int*, float*))
     428             : FUNC(int, wglChoosePixelFormatARB, (HDC, const int *, const float*, unsigned int, int*, unsigned int*))
     429             : #endif // OS_WIN
     430             : 
     431             : 
     432             : // GLX_MESA_query_renderer
     433           0 : FUNC(int /*Bool*/, glXQueryRendererIntegerMESA, (void /*Display*/ *dpy, int screen, int renderer, int attribute, unsigned int *value))
     434           0 : FUNC(int /*Bool*/, glXQueryCurrentRendererIntegerMESA, (int attribute, unsigned int *value))
     435           0 : FUNC(const char *, glXQueryRendererStringMESA, (void /*Display*/ *dpy, int screen, int renderer, int attribute))
     436           0 : FUNC(const char *, glXQueryCurrentRendererStringMESA, (int attribute))

Generated by: LCOV version 1.13