| 1 | /* |
| 2 | * Copyright (C) 2010 Tieto Corporation. |
| 3 | * Copyright (C) 2011 Igalia S.L. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef OpenGLShims_h |
| 21 | #define OpenGLShims_h |
| 22 | |
| 23 | #include <GL/gl.h> |
| 24 | #include <GL/glext.h> |
| 25 | |
| 26 | #if defined(GL_ES_VERSION_2_0) |
| 27 | // Some openGL ES systems miss this typedef. |
| 28 | typedef char GLchar; |
| 29 | #endif |
| 30 | |
| 31 | typedef struct _OpenGLFunctionTable OpenGLFunctionTable; |
| 32 | |
| 33 | namespace WebCore { |
| 34 | bool initializeOpenGLShims(); |
| 35 | OpenGLFunctionTable* openGLFunctionTable(); |
| 36 | } |
| 37 | |
| 38 | #if OS(WINDOWS) |
| 39 | #define GLAPIENTRY __stdcall |
| 40 | #else |
| 41 | #define GLAPIENTRY |
| 42 | #endif |
| 43 | |
| 44 | typedef void (GLAPIENTRY *glActiveTextureType) (GLenum); |
| 45 | typedef void (GLAPIENTRY *glAttachShaderType) (GLuint, GLuint); |
| 46 | typedef void (GLAPIENTRY *glBindAttribLocationType) (GLuint, GLuint, const char*); |
| 47 | typedef void (GLAPIENTRY *glBindBufferType) (GLenum, GLuint); |
| 48 | typedef void (GLAPIENTRY *glBindFramebufferType) (GLenum, GLuint); |
| 49 | typedef void (GLAPIENTRY *glBindRenderbufferType) (GLenum, GLuint); |
| 50 | typedef void (GLAPIENTRY *glBindVertexArrayType) (GLuint); |
| 51 | typedef void (GLAPIENTRY *glBlendColorType) (GLclampf, GLclampf, GLclampf, GLclampf); |
| 52 | typedef void (GLAPIENTRY *glBlendEquationType) (GLenum); |
| 53 | typedef void (GLAPIENTRY *glBlendEquationSeparateType)(GLenum, GLenum); |
| 54 | typedef void (GLAPIENTRY *glBlendFuncSeparateType)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); |
| 55 | typedef void (GLAPIENTRY *glBlitFramebufferType) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); |
| 56 | typedef void (GLAPIENTRY *glBufferDataType) (GLenum, GLsizeiptr, const GLvoid*, GLenum); |
| 57 | typedef void (GLAPIENTRY *glBufferSubDataType) (GLenum, GLintptr, GLsizeiptr, const GLvoid*); |
| 58 | typedef GLenum (GLAPIENTRY *glCheckFramebufferStatusType) (GLenum); |
| 59 | typedef void (GLAPIENTRY *glCompileShaderType) (GLuint); |
| 60 | typedef void (GLAPIENTRY *glCompressedTexImage2DType) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*); |
| 61 | typedef void (GLAPIENTRY *glCompressedTexSubImage2DType) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*); |
| 62 | typedef GLuint (GLAPIENTRY *glCreateProgramType) (); |
| 63 | typedef GLuint (GLAPIENTRY *glCreateShaderType) (GLenum); |
| 64 | typedef void (GLAPIENTRY *glDeleteBuffersType) (GLsizei, const GLuint*); |
| 65 | typedef void (GLAPIENTRY *glDeleteFramebuffersType) (GLsizei n, const GLuint*); |
| 66 | typedef void (GLAPIENTRY *glDeleteProgramType) (GLuint); |
| 67 | typedef void (GLAPIENTRY *glDeleteRenderbuffersType) (GLsizei n, const GLuint*); |
| 68 | typedef void (GLAPIENTRY *glDeleteShaderType) (GLuint); |
| 69 | typedef void (GLAPIENTRY *glDeleteVertexArraysType) (GLsizei, const GLuint*); |
| 70 | typedef void (GLAPIENTRY *glDetachShaderType) (GLuint, GLuint); |
| 71 | typedef void (GLAPIENTRY *glDisableVertexAttribArrayType) (GLuint); |
| 72 | typedef void (GLAPIENTRY *glDrawArraysInstancedType) (GLenum, GLint, GLsizei, GLsizei); |
| 73 | typedef void (GLAPIENTRY *glDrawBuffersType) (GLsizei, const GLenum*); |
| 74 | typedef void (GLAPIENTRY *glDrawElementsInstancedType) (GLenum, GLsizei, GLenum, const GLvoid*, GLsizei); |
| 75 | typedef void (GLAPIENTRY *glEnableVertexAttribArrayType) (GLuint); |
| 76 | typedef void (GLAPIENTRY *glFramebufferRenderbufferType) (GLenum, GLenum, GLenum, GLuint); |
| 77 | typedef void (GLAPIENTRY *glFramebufferTexture2DType) (GLenum, GLenum, GLenum, GLuint, GLint); |
| 78 | typedef void (GLAPIENTRY *glGenBuffersType) (GLsizei, GLuint*); |
| 79 | typedef void (GLAPIENTRY *glGenerateMipmapType) (GLenum target); |
| 80 | typedef void (GLAPIENTRY *glGenFramebuffersType) (GLsizei, GLuint*); |
| 81 | typedef void (GLAPIENTRY *glGenRenderbuffersType) (GLsizei, GLuint*); |
| 82 | typedef void (GLAPIENTRY *glGenVertexArraysType) (GLsizei, GLuint*); |
| 83 | typedef void (GLAPIENTRY *glGetActiveAttribType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); |
| 84 | typedef void (GLAPIENTRY *glGetActiveUniformType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); |
| 85 | typedef void (GLAPIENTRY *glGetAttachedShadersType) (GLuint, GLsizei, GLsizei*, GLuint*); |
| 86 | typedef GLint (GLAPIENTRY *glGetAttribLocationType) (GLuint, const char*); |
| 87 | typedef void (GLAPIENTRY *glGetBufferParameterivType) (GLenum, GLenum, GLint*); |
| 88 | typedef void (GLAPIENTRY *glGetFramebufferAttachmentParameterivType) (GLenum, GLenum, GLenum, GLint* params); |
| 89 | typedef void (GLAPIENTRY *glGetProgramInfoLogType) (GLuint, GLsizei, GLsizei*, char*); |
| 90 | typedef void (GLAPIENTRY *glGetProgramivType) (GLuint, GLenum, GLint*); |
| 91 | typedef void (GLAPIENTRY *glGetRenderbufferParameterivType) (GLenum, GLenum, GLint*); |
| 92 | typedef void (GLAPIENTRY *glGetShaderInfoLogType) (GLuint, GLsizei, GLsizei*, char*); |
| 93 | typedef void (GLAPIENTRY *glGetShaderivType) (GLuint, GLenum, GLint*); |
| 94 | typedef void (GLAPIENTRY *glGetShaderSourceType) (GLuint, GLsizei, GLsizei*, char*); |
| 95 | typedef const GLubyte* (GLAPIENTRY *glGetStringiType) (GLenum, GLuint); |
| 96 | typedef GLint (GLAPIENTRY *glGetUniformLocationType) (GLuint, const char*); |
| 97 | typedef void (GLAPIENTRY *glGetUniformfvType) (GLuint, GLint, GLfloat*); |
| 98 | typedef void (GLAPIENTRY *glGetUniformivType) (GLuint, GLint, GLint*); |
| 99 | typedef void (GLAPIENTRY *glGetVertexAttribfvType) (GLuint, GLenum, GLfloat*); |
| 100 | typedef void (GLAPIENTRY *glGetVertexAttribivType) (GLuint, GLenum, GLint*); |
| 101 | typedef void (GLAPIENTRY *glGetVertexAttribPointervType) (GLuint, GLenum, GLvoid**); |
| 102 | typedef GLboolean (GLAPIENTRY *glIsBufferType) (GLuint); |
| 103 | typedef GLboolean (GLAPIENTRY *glIsFramebufferType) (GLuint); |
| 104 | typedef GLboolean (GLAPIENTRY *glIsProgramType) (GLuint); |
| 105 | typedef GLboolean (GLAPIENTRY *glIsRenderbufferType) (GLuint); |
| 106 | typedef GLboolean (GLAPIENTRY *glIsShaderType) (GLuint); |
| 107 | typedef GLboolean (GLAPIENTRY *glIsVertexArrayType) (GLuint); |
| 108 | typedef void (GLAPIENTRY *glLinkProgramType) (GLuint); |
| 109 | typedef void (GLAPIENTRY *glRenderbufferStorageType) (GLenum, GLenum, GLsizei, GLsizei); |
| 110 | typedef void (GLAPIENTRY *glRenderbufferStorageMultisampleType) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); |
| 111 | typedef void (GLAPIENTRY *glSampleCoverageType) (GLclampf, GLboolean); |
| 112 | typedef void (GLAPIENTRY *glShaderSourceType) (GLuint, GLsizei, const char**, const GLint*); |
| 113 | typedef void (GLAPIENTRY *glStencilFuncSeparateType) (GLenum, GLenum, GLint, GLuint); |
| 114 | typedef void (GLAPIENTRY *glStencilMaskSeparateType) (GLenum, GLuint); |
| 115 | typedef void (GLAPIENTRY *glStencilOpSeparateType) (GLenum, GLenum, GLenum, GLenum); |
| 116 | typedef void (GLAPIENTRY *glUniform1fType) (GLint, GLfloat); |
| 117 | typedef void (GLAPIENTRY *glUniform1fvType) (GLint, GLsizei, const GLfloat*); |
| 118 | typedef void (GLAPIENTRY *glUniform1iType) (GLint, GLint); |
| 119 | typedef void (GLAPIENTRY *glUniform1ivType) (GLint, GLsizei, const GLint*); |
| 120 | typedef void (GLAPIENTRY *glUniform2fType) (GLint, GLfloat, GLfloat); |
| 121 | typedef void (GLAPIENTRY *glUniform2fvType) (GLint, GLsizei, const GLfloat*); |
| 122 | typedef void (GLAPIENTRY *glUniform2iType) (GLint, GLint, GLint); |
| 123 | typedef void (GLAPIENTRY *glUniform2ivType) (GLint, GLsizei, const GLint*); |
| 124 | typedef void (GLAPIENTRY *glUniform3fType) (GLint, GLfloat, GLfloat, GLfloat); |
| 125 | typedef void (GLAPIENTRY *glUniform3fvType) (GLint, GLsizei, const GLfloat*); |
| 126 | typedef void (GLAPIENTRY *glUniform3iType) (GLint, GLint, GLint, GLint); |
| 127 | typedef void (GLAPIENTRY *glUniform3ivType) (GLint, GLsizei, const GLint*); |
| 128 | typedef void (GLAPIENTRY *glUniform4fType) (GLint, GLfloat, GLfloat, GLfloat, GLfloat); |
| 129 | typedef void (GLAPIENTRY *glUniform4fvType) (GLint, GLsizei, const GLfloat*); |
| 130 | typedef void (GLAPIENTRY *glUniform4iType) (GLint, GLint, GLint, GLint, GLint); |
| 131 | typedef void (GLAPIENTRY *glUniform4ivType) (GLint, GLsizei, const GLint*); |
| 132 | typedef void (GLAPIENTRY *glUniformMatrix2fvType) (GLint, GLsizei, GLboolean, const GLfloat*); |
| 133 | typedef void (GLAPIENTRY *glUniformMatrix3fvType) (GLint, GLsizei, GLboolean, const GLfloat*); |
| 134 | typedef void (GLAPIENTRY *glUniformMatrix4fvType) (GLint, GLsizei, GLboolean, const GLfloat*); |
| 135 | typedef void (GLAPIENTRY *glUseProgramType) (GLuint); |
| 136 | typedef void (GLAPIENTRY *glValidateProgramType) (GLuint); |
| 137 | typedef void (GLAPIENTRY *glVertexAttrib1fType) (GLuint, const GLfloat); |
| 138 | typedef void (GLAPIENTRY *glVertexAttrib1fvType) (GLuint, const GLfloat*); |
| 139 | typedef void (GLAPIENTRY *glVertexAttrib2fType) (GLuint, const GLfloat, const GLfloat); |
| 140 | typedef void (GLAPIENTRY *glVertexAttrib2fvType) (GLuint, const GLfloat*); |
| 141 | typedef void (GLAPIENTRY *glVertexAttrib3fType) (GLuint, const GLfloat, const GLfloat, const GLfloat); |
| 142 | typedef void (GLAPIENTRY *glVertexAttrib3fvType) (GLuint, const GLfloat*); |
| 143 | typedef void (GLAPIENTRY *glVertexAttrib4fType) (GLuint, const GLfloat, const GLfloat, const GLfloat, const GLfloat); |
| 144 | typedef void (GLAPIENTRY *glVertexAttrib4fvType) (GLuint, const GLfloat*); |
| 145 | typedef void (GLAPIENTRY *glVertexAttribDivisorType) (GLuint, GLuint); |
| 146 | typedef void (GLAPIENTRY *glVertexAttribPointerType) (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*); |
| 147 | |
| 148 | #define FUNCTION_TABLE_ENTRY(FunctionName) FunctionName##Type FunctionName |
| 149 | |
| 150 | typedef struct _OpenGLFunctionTable { |
| 151 | FUNCTION_TABLE_ENTRY(glActiveTexture); |
| 152 | FUNCTION_TABLE_ENTRY(glAttachShader); |
| 153 | FUNCTION_TABLE_ENTRY(glBindAttribLocation); |
| 154 | FUNCTION_TABLE_ENTRY(glBindBuffer); |
| 155 | FUNCTION_TABLE_ENTRY(glBindFramebuffer); |
| 156 | FUNCTION_TABLE_ENTRY(glBindRenderbuffer); |
| 157 | FUNCTION_TABLE_ENTRY(glBindVertexArray); |
| 158 | FUNCTION_TABLE_ENTRY(glBlendColor); |
| 159 | FUNCTION_TABLE_ENTRY(glBlendEquation); |
| 160 | FUNCTION_TABLE_ENTRY(glBlendEquationSeparate); |
| 161 | FUNCTION_TABLE_ENTRY(glBlendFuncSeparate); |
| 162 | FUNCTION_TABLE_ENTRY(glBlitFramebuffer); |
| 163 | FUNCTION_TABLE_ENTRY(glBufferData); |
| 164 | FUNCTION_TABLE_ENTRY(glBufferSubData); |
| 165 | FUNCTION_TABLE_ENTRY(glCheckFramebufferStatus); |
| 166 | FUNCTION_TABLE_ENTRY(glCompileShader); |
| 167 | FUNCTION_TABLE_ENTRY(glCompressedTexImage2D); |
| 168 | FUNCTION_TABLE_ENTRY(glCompressedTexSubImage2D); |
| 169 | FUNCTION_TABLE_ENTRY(glCreateProgram); |
| 170 | FUNCTION_TABLE_ENTRY(glCreateShader); |
| 171 | FUNCTION_TABLE_ENTRY(glDeleteBuffers); |
| 172 | FUNCTION_TABLE_ENTRY(glDeleteFramebuffers); |
| 173 | FUNCTION_TABLE_ENTRY(glDeleteProgram); |
| 174 | FUNCTION_TABLE_ENTRY(glDeleteRenderbuffers); |
| 175 | FUNCTION_TABLE_ENTRY(glDeleteShader); |
| 176 | FUNCTION_TABLE_ENTRY(glDeleteVertexArrays); |
| 177 | FUNCTION_TABLE_ENTRY(glDetachShader); |
| 178 | FUNCTION_TABLE_ENTRY(glDisableVertexAttribArray); |
| 179 | FUNCTION_TABLE_ENTRY(glDrawArraysInstanced); |
| 180 | FUNCTION_TABLE_ENTRY(glDrawBuffers); |
| 181 | FUNCTION_TABLE_ENTRY(glDrawElementsInstanced); |
| 182 | FUNCTION_TABLE_ENTRY(glEnableVertexAttribArray); |
| 183 | FUNCTION_TABLE_ENTRY(glFramebufferRenderbuffer); |
| 184 | FUNCTION_TABLE_ENTRY(glFramebufferTexture2D); |
| 185 | FUNCTION_TABLE_ENTRY(glGenBuffers); |
| 186 | FUNCTION_TABLE_ENTRY(glGenerateMipmap); |
| 187 | FUNCTION_TABLE_ENTRY(glGenFramebuffers); |
| 188 | FUNCTION_TABLE_ENTRY(glGenRenderbuffers); |
| 189 | FUNCTION_TABLE_ENTRY(glGenVertexArrays); |
| 190 | FUNCTION_TABLE_ENTRY(glGetActiveAttrib); |
| 191 | FUNCTION_TABLE_ENTRY(glGetActiveUniform); |
| 192 | FUNCTION_TABLE_ENTRY(glGetAttachedShaders); |
| 193 | FUNCTION_TABLE_ENTRY(glGetAttribLocation); |
| 194 | FUNCTION_TABLE_ENTRY(glGetBufferParameteriv); |
| 195 | FUNCTION_TABLE_ENTRY(glGetFramebufferAttachmentParameteriv); |
| 196 | FUNCTION_TABLE_ENTRY(glGetProgramInfoLog); |
| 197 | FUNCTION_TABLE_ENTRY(glGetProgramiv); |
| 198 | FUNCTION_TABLE_ENTRY(glGetRenderbufferParameteriv); |
| 199 | FUNCTION_TABLE_ENTRY(glGetShaderInfoLog); |
| 200 | FUNCTION_TABLE_ENTRY(glGetShaderiv); |
| 201 | FUNCTION_TABLE_ENTRY(glGetShaderSource); |
| 202 | FUNCTION_TABLE_ENTRY(glGetStringi); |
| 203 | FUNCTION_TABLE_ENTRY(glGetUniformfv); |
| 204 | FUNCTION_TABLE_ENTRY(glGetUniformiv); |
| 205 | FUNCTION_TABLE_ENTRY(glGetUniformLocation); |
| 206 | FUNCTION_TABLE_ENTRY(glGetVertexAttribfv); |
| 207 | FUNCTION_TABLE_ENTRY(glGetVertexAttribiv); |
| 208 | FUNCTION_TABLE_ENTRY(glGetVertexAttribPointerv); |
| 209 | FUNCTION_TABLE_ENTRY(glIsBuffer); |
| 210 | FUNCTION_TABLE_ENTRY(glIsFramebuffer); |
| 211 | FUNCTION_TABLE_ENTRY(glIsProgram); |
| 212 | FUNCTION_TABLE_ENTRY(glIsRenderbuffer); |
| 213 | FUNCTION_TABLE_ENTRY(glIsShader); |
| 214 | FUNCTION_TABLE_ENTRY(glIsVertexArray); |
| 215 | FUNCTION_TABLE_ENTRY(glLinkProgram); |
| 216 | FUNCTION_TABLE_ENTRY(glRenderbufferStorage); |
| 217 | FUNCTION_TABLE_ENTRY(glRenderbufferStorageMultisample); |
| 218 | FUNCTION_TABLE_ENTRY(glSampleCoverage); |
| 219 | FUNCTION_TABLE_ENTRY(glShaderSource); |
| 220 | FUNCTION_TABLE_ENTRY(glStencilFuncSeparate); |
| 221 | FUNCTION_TABLE_ENTRY(glStencilMaskSeparate); |
| 222 | FUNCTION_TABLE_ENTRY(glStencilOpSeparate); |
| 223 | FUNCTION_TABLE_ENTRY(glUniform1f); |
| 224 | FUNCTION_TABLE_ENTRY(glUniform1fv); |
| 225 | FUNCTION_TABLE_ENTRY(glUniform1i); |
| 226 | FUNCTION_TABLE_ENTRY(glUniform1iv); |
| 227 | FUNCTION_TABLE_ENTRY(glUniform2f); |
| 228 | FUNCTION_TABLE_ENTRY(glUniform2fv); |
| 229 | FUNCTION_TABLE_ENTRY(glUniform2i); |
| 230 | FUNCTION_TABLE_ENTRY(glUniform2iv); |
| 231 | FUNCTION_TABLE_ENTRY(glUniform3f); |
| 232 | FUNCTION_TABLE_ENTRY(glUniform3fv); |
| 233 | FUNCTION_TABLE_ENTRY(glUniform3i); |
| 234 | FUNCTION_TABLE_ENTRY(glUniform3iv); |
| 235 | FUNCTION_TABLE_ENTRY(glUniform4f); |
| 236 | FUNCTION_TABLE_ENTRY(glUniform4fv); |
| 237 | FUNCTION_TABLE_ENTRY(glUniform4i); |
| 238 | FUNCTION_TABLE_ENTRY(glUniform4iv); |
| 239 | FUNCTION_TABLE_ENTRY(glUniformMatrix2fv); |
| 240 | FUNCTION_TABLE_ENTRY(glUniformMatrix3fv); |
| 241 | FUNCTION_TABLE_ENTRY(glUniformMatrix4fv); |
| 242 | FUNCTION_TABLE_ENTRY(glUseProgram); |
| 243 | FUNCTION_TABLE_ENTRY(glValidateProgram); |
| 244 | FUNCTION_TABLE_ENTRY(glVertexAttrib1f); |
| 245 | FUNCTION_TABLE_ENTRY(glVertexAttrib1fv); |
| 246 | FUNCTION_TABLE_ENTRY(glVertexAttrib2f); |
| 247 | FUNCTION_TABLE_ENTRY(glVertexAttrib2fv); |
| 248 | FUNCTION_TABLE_ENTRY(glVertexAttrib3f); |
| 249 | FUNCTION_TABLE_ENTRY(glVertexAttrib3fv); |
| 250 | FUNCTION_TABLE_ENTRY(glVertexAttrib4f); |
| 251 | FUNCTION_TABLE_ENTRY(glVertexAttrib4fv); |
| 252 | FUNCTION_TABLE_ENTRY(glVertexAttribDivisor); |
| 253 | FUNCTION_TABLE_ENTRY(glVertexAttribPointer); |
| 254 | } OpenGLFunctionTable; |
| 255 | |
| 256 | // We disable the shims for OpenGLShims.cpp, so that we can set them. |
| 257 | #ifndef DISABLE_SHIMS |
| 258 | #define LOOKUP_GL_FUNCTION(Function) WebCore::openGLFunctionTable()->Function |
| 259 | #define glActiveTexture LOOKUP_GL_FUNCTION(glActiveTexture) |
| 260 | #define glAttachShader LOOKUP_GL_FUNCTION(glAttachShader) |
| 261 | #define glBindAttribLocation LOOKUP_GL_FUNCTION(glBindAttribLocation) |
| 262 | #define glBindBuffer LOOKUP_GL_FUNCTION(glBindBuffer) |
| 263 | #define glBindFramebufferEXT glBindFramebuffer |
| 264 | #define glBindFramebuffer LOOKUP_GL_FUNCTION(glBindFramebuffer) |
| 265 | #define glBindRenderbufferEXT glBindRenderbuffer |
| 266 | #define glBindRenderbuffer LOOKUP_GL_FUNCTION(glBindRenderbuffer) |
| 267 | #define glBindVertexArrayOES glBindVertexArray |
| 268 | #define glBindVertexArray LOOKUP_GL_FUNCTION(glBindVertexArray) |
| 269 | #define glBlendColor LOOKUP_GL_FUNCTION(glBlendColor) |
| 270 | #define glBlendEquation LOOKUP_GL_FUNCTION(glBlendEquation) |
| 271 | #define glBlendEquationSeparate LOOKUP_GL_FUNCTION(glBlendEquationSeparate) |
| 272 | #define glBlendFuncSeparate LOOKUP_GL_FUNCTION(glBlendFuncSeparate) |
| 273 | #define glBlitFramebufferEXT glBlitFramebuffer |
| 274 | #define glBlitFramebuffer LOOKUP_GL_FUNCTION(glBlitFramebuffer) |
| 275 | #define glBufferData LOOKUP_GL_FUNCTION(glBufferData) |
| 276 | #define glBufferSubData LOOKUP_GL_FUNCTION(glBufferSubData) |
| 277 | #define glCheckFramebufferStatusEXT glCheckFramebufferStatus |
| 278 | #define glCheckFramebufferStatus LOOKUP_GL_FUNCTION(glCheckFramebufferStatus) |
| 279 | #define glCompileShader LOOKUP_GL_FUNCTION(glCompileShader) |
| 280 | #define glCompressedTexImage2D LOOKUP_GL_FUNCTION(glCompressedTexImage2D) |
| 281 | #define glCompressedTexSubImage2D LOOKUP_GL_FUNCTION(glCompressedTexSubImage2D) |
| 282 | #define glCreateProgram LOOKUP_GL_FUNCTION(glCreateProgram) |
| 283 | #define glCreateShader LOOKUP_GL_FUNCTION(glCreateShader) |
| 284 | #define glDeleteBuffers LOOKUP_GL_FUNCTION(glDeleteBuffers) |
| 285 | #define glDeleteFramebuffersEXT glDeleteFramebuffers |
| 286 | #define glDeleteFramebuffers LOOKUP_GL_FUNCTION(glDeleteFramebuffers) |
| 287 | #define glDeleteProgram LOOKUP_GL_FUNCTION(glDeleteProgram) |
| 288 | #define glDeleteRenderbuffersEXT glDeleteRenderbuffers |
| 289 | #define glDeleteRenderbuffers LOOKUP_GL_FUNCTION(glDeleteRenderbuffers) |
| 290 | #define glDeleteShader LOOKUP_GL_FUNCTION(glDeleteShader) |
| 291 | #define glDeleteVertexArraysOES glDeleteVertexArrays |
| 292 | #define glDeleteVertexArrays LOOKUP_GL_FUNCTION(glDeleteVertexArrays) |
| 293 | #define glDetachShader LOOKUP_GL_FUNCTION(glDetachShader) |
| 294 | #define glDisableVertexAttribArray LOOKUP_GL_FUNCTION(glDisableVertexAttribArray) |
| 295 | #define glDrawArraysInstancedEXT glDrawArraysInstanced |
| 296 | #define glDrawArraysInstanced LOOKUP_GL_FUNCTION(glDrawArraysInstanced) |
| 297 | #define glDrawBuffersEXT glDrawBuffers |
| 298 | #define glDrawBuffers LOOKUP_GL_FUNCTION(glDrawBuffers) |
| 299 | #define glDrawElementsInstancedEXT glDrawElementsInstanced |
| 300 | #define glDrawElementsInstanced LOOKUP_GL_FUNCTION(glDrawElementsInstanced) |
| 301 | #define glEnableVertexAttribArray LOOKUP_GL_FUNCTION(glEnableVertexAttribArray) |
| 302 | #define glFramebufferRenderbufferEXT glFramebufferRenderbuffer |
| 303 | #define glFramebufferRenderbuffer LOOKUP_GL_FUNCTION(glFramebufferRenderbuffer) |
| 304 | #define glFramebufferTexture2DEXT glFramebufferTexture2D |
| 305 | #define glFramebufferTexture2D LOOKUP_GL_FUNCTION(glFramebufferTexture2D) |
| 306 | #define glGenBuffers LOOKUP_GL_FUNCTION(glGenBuffers) |
| 307 | #define glGenerateMipmapEXT glGenerateMipmap |
| 308 | #define glGenerateMipmap LOOKUP_GL_FUNCTION(glGenerateMipmap) |
| 309 | #define glGenFramebuffersEXT glGenFramebuffers |
| 310 | #define glGenFramebuffers LOOKUP_GL_FUNCTION(glGenFramebuffers) |
| 311 | #define glGenRenderbuffersEXT glGenRenderbuffers |
| 312 | #define glGenRenderbuffers LOOKUP_GL_FUNCTION(glGenRenderbuffers) |
| 313 | #define glGenVertexArraysOES glGenVertexArrays; |
| 314 | #define glGenVertexArrays LOOKUP_GL_FUNCTION(glGenVertexArrays) |
| 315 | #define glGetActiveAttrib LOOKUP_GL_FUNCTION(glGetActiveAttrib) |
| 316 | #define glGetActiveUniform LOOKUP_GL_FUNCTION(glGetActiveUniform) |
| 317 | #define glGetAttachedShaders LOOKUP_GL_FUNCTION(glGetAttachedShaders) |
| 318 | #define glGetAttribLocation LOOKUP_GL_FUNCTION(glGetAttribLocation) |
| 319 | #define glGetBufferParameterivEXT glGetBufferParameteriv |
| 320 | #define glGetBufferParameteriv LOOKUP_GL_FUNCTION(glGetBufferParameteriv) |
| 321 | #define glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv |
| 322 | #define glGetFramebufferAttachmentParameteriv LOOKUP_GL_FUNCTION(glGetFramebufferAttachmentParameteriv) |
| 323 | #define glGetProgramInfoLog LOOKUP_GL_FUNCTION(glGetProgramInfoLog) |
| 324 | #define glGetProgramiv LOOKUP_GL_FUNCTION(glGetProgramiv) |
| 325 | #define glGetRenderbufferParameterivEXT glGetRenderbufferParameteriv |
| 326 | #define glGetRenderbufferParameteriv LOOKUP_GL_FUNCTION(glGetRenderbufferParameteriv) |
| 327 | #define glGetShaderInfoLog LOOKUP_GL_FUNCTION(glGetShaderInfoLog) |
| 328 | #define glGetShaderiv LOOKUP_GL_FUNCTION(glGetShaderiv) |
| 329 | #define glGetShaderSource LOOKUP_GL_FUNCTION(glGetShaderSource) |
| 330 | #define glGetStringi LOOKUP_GL_FUNCTION(glGetStringi) |
| 331 | #define glGetUniformfv LOOKUP_GL_FUNCTION(glGetUniformfv) |
| 332 | #define glGetUniformiv LOOKUP_GL_FUNCTION(glGetUniformiv) |
| 333 | #define glGetUniformLocation LOOKUP_GL_FUNCTION(glGetUniformLocation) |
| 334 | #define glGetVertexAttribfv LOOKUP_GL_FUNCTION(glGetVertexAttribfv) |
| 335 | #define glGetVertexAttribiv LOOKUP_GL_FUNCTION(glGetVertexAttribiv) |
| 336 | #define glGetVertexAttribPointerv LOOKUP_GL_FUNCTION(glGetVertexAttribPointerv) |
| 337 | #define glIsBuffer LOOKUP_GL_FUNCTION(glIsBuffer) |
| 338 | #define glIsFramebufferEXT glIsFramebuffer |
| 339 | #define glIsFramebuffer LOOKUP_GL_FUNCTION(glIsFramebuffer) |
| 340 | #define glIsProgram LOOKUP_GL_FUNCTION(glIsProgram) |
| 341 | #define glIsRenderbufferEXT glIsRenderbuffer |
| 342 | #define glIsRenderbuffer LOOKUP_GL_FUNCTION(glIsRenderbuffer) |
| 343 | #define glIsShader LOOKUP_GL_FUNCTION(glIsShader) |
| 344 | #define glIsVertexArrayOES glIsVertexArray; |
| 345 | #define glIsVertexArray LOOKUP_GL_FUNCTION(glIsVertexArray) |
| 346 | #define glLinkProgram LOOKUP_GL_FUNCTION(glLinkProgram) |
| 347 | #define glRenderbufferStorageEXT glRenderbufferStorage |
| 348 | #define glRenderbufferStorage LOOKUP_GL_FUNCTION(glRenderbufferStorage) |
| 349 | #define glRenderbufferStorageMultisampleEXT glRenderbufferStorageMultisample |
| 350 | #define glRenderbufferStorageMultisample LOOKUP_GL_FUNCTION(glRenderbufferStorageMultisample) |
| 351 | #define glSampleCoverage LOOKUP_GL_FUNCTION(glSampleCoverage) |
| 352 | #define glShaderSource LOOKUP_GL_FUNCTION(glShaderSource) |
| 353 | #define glStencilFuncSeparate LOOKUP_GL_FUNCTION(glStencilFuncSeparate) |
| 354 | #define glStencilMaskSeparate LOOKUP_GL_FUNCTION(glStencilMaskSeparate) |
| 355 | #define glStencilOpSeparate LOOKUP_GL_FUNCTION(glStencilOpSeparate) |
| 356 | #define glUniform1f LOOKUP_GL_FUNCTION(glUniform1f) |
| 357 | #define glUniform1fv LOOKUP_GL_FUNCTION(glUniform1fv) |
| 358 | #define glUniform1i LOOKUP_GL_FUNCTION(glUniform1i) |
| 359 | #define glUniform1iv LOOKUP_GL_FUNCTION(glUniform1iv) |
| 360 | #define glUniform2f LOOKUP_GL_FUNCTION(glUniform2f) |
| 361 | #define glUniform2fv LOOKUP_GL_FUNCTION(glUniform2fv) |
| 362 | #define glUniform2i LOOKUP_GL_FUNCTION(glUniform2i) |
| 363 | #define glUniform2iv LOOKUP_GL_FUNCTION(glUniform2iv) |
| 364 | #define glUniform3f LOOKUP_GL_FUNCTION(glUniform3f) |
| 365 | #define glUniform3fv LOOKUP_GL_FUNCTION(glUniform3fv) |
| 366 | #define glUniform3i LOOKUP_GL_FUNCTION(glUniform3i) |
| 367 | #define glUniform3iv LOOKUP_GL_FUNCTION(glUniform3iv) |
| 368 | #define glUniform4f LOOKUP_GL_FUNCTION(glUniform4f) |
| 369 | #define glUniform4fv LOOKUP_GL_FUNCTION(glUniform4fv) |
| 370 | #define glUniform4i LOOKUP_GL_FUNCTION(glUniform4i) |
| 371 | #define glUniform4iv LOOKUP_GL_FUNCTION(glUniform4iv) |
| 372 | #define glUniformMatrix2fv LOOKUP_GL_FUNCTION(glUniformMatrix2fv) |
| 373 | #define glUniformMatrix3fv LOOKUP_GL_FUNCTION(glUniformMatrix3fv) |
| 374 | #define glUniformMatrix4fv LOOKUP_GL_FUNCTION(glUniformMatrix4fv) |
| 375 | #define glUseProgram LOOKUP_GL_FUNCTION(glUseProgram) |
| 376 | #define glValidateProgram LOOKUP_GL_FUNCTION(glValidateProgram) |
| 377 | #define glVertexAttrib1f LOOKUP_GL_FUNCTION(glVertexAttrib1f) |
| 378 | #define glVertexAttrib1fv LOOKUP_GL_FUNCTION(glVertexAttrib1fv) |
| 379 | #define glVertexAttrib2f LOOKUP_GL_FUNCTION(glVertexAttrib2f) |
| 380 | #define glVertexAttrib2fv LOOKUP_GL_FUNCTION(glVertexAttrib2fv) |
| 381 | #define glVertexAttrib3f LOOKUP_GL_FUNCTION(glVertexAttrib3f) |
| 382 | #define glVertexAttrib3fv LOOKUP_GL_FUNCTION(glVertexAttrib3fv) |
| 383 | #define glVertexAttrib4f LOOKUP_GL_FUNCTION(glVertexAttrib4f) |
| 384 | #define glVertexAttrib4fv LOOKUP_GL_FUNCTION(glVertexAttrib4fv) |
| 385 | #define glVertexAttribDivisorEXT glVertexAttribDivisor |
| 386 | #define glVertexAttribDivisor LOOKUP_GL_FUNCTION(glVertexAttribDivisor) |
| 387 | #define glVertexAttribPointer LOOKUP_GL_FUNCTION(glVertexAttribPointer) |
| 388 | #endif |
| 389 | |
| 390 | #endif |
| 391 | |