| 1 | /* |
| 2 | * Copyright (c) 2012 Carsten Munk <carsten.munk@gmail.com> |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #define GL_GLEXT_PROTOTYPES |
| 19 | #include <GLES2/gl2.h> |
| 20 | #include <GLES2/gl2ext.h> |
| 21 | #include <dlfcn.h> |
| 22 | #include <stddef.h> |
| 23 | #include <stdlib.h> |
| 24 | |
| 25 | #include <hybris/internal/binding.h> |
| 26 | #include <hybris/internal/floating_point_abi.h> |
| 27 | |
| 28 | static void *_libglesv2 = NULL; |
| 29 | |
| 30 | static void (*_glActiveTexture)(GLenum texture) = NULL; |
| 31 | static void (*_glAttachShader)(GLuint program, GLuint shader) = NULL; |
| 32 | static void (*_glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) = NULL; |
| 33 | static void (*_glBindBuffer)(GLenum target, GLuint buffer) = NULL; |
| 34 | static void (*_glBindFramebuffer)(GLenum target, GLuint framebuffer) = NULL; |
| 35 | static void (*_glBindRenderbuffer)(GLenum target, GLuint renderbuffer) = NULL; |
| 36 | static void (*_glBindTexture)(GLenum target, GLuint texture) = NULL; |
| 37 | static void (*_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL; |
| 38 | static void (*_glBlendEquation)(GLenum mode ) = NULL; |
| 39 | static void (*_glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) = NULL; |
| 40 | static void (*_glBlendFunc)(GLenum sfactor, GLenum dfactor) = NULL; |
| 41 | static void (*_glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = NULL; |
| 42 | static void (*_glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) = NULL; |
| 43 | static void (*_glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) = NULL; |
| 44 | static GLenum (*_glCheckFramebufferStatus)(GLenum target) = NULL; |
| 45 | static void (*_glClear)(GLbitfield mask) = NULL; |
| 46 | static void (*_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL; |
| 47 | static void (*_glClearDepthf)(GLclampf depth) FP_ATTRIB = NULL; |
| 48 | static void (*_glClearStencil)(GLint s) = NULL; |
| 49 | static void (*_glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL; |
| 50 | static void (*_glCompileShader)(GLuint shader) = NULL; |
| 51 | static void (*_glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) = NULL; |
| 52 | static void (*_glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) = NULL; |
| 53 | static void (*_glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = NULL; |
| 54 | static void (*_glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; |
| 55 | static GLuint (*_glCreateProgram)(void) = NULL; |
| 56 | static GLuint (*_glCreateShader)(GLenum type) = NULL; |
| 57 | static void (*_glCullFace)(GLenum mode) = NULL; |
| 58 | static void (*_glDeleteBuffers)(GLsizei n, const GLuint* buffers) = NULL; |
| 59 | static void (*_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) = NULL; |
| 60 | static void (*_glDeleteProgram)(GLuint program) = NULL; |
| 61 | static void (*_glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) = NULL; |
| 62 | static void (*_glDeleteShader)(GLuint shader) = NULL; |
| 63 | static void (*_glDeleteTextures)(GLsizei n, const GLuint* textures) = NULL; |
| 64 | static void (*_glDepthFunc)(GLenum func) = NULL; |
| 65 | static void (*_glDepthMask)(GLboolean flag) = NULL; |
| 66 | static void (*_glDepthRangef)(GLclampf zNear, GLclampf zFar) FP_ATTRIB = NULL; |
| 67 | static void (*_glDetachShader)(GLuint program, GLuint shader) = NULL; |
| 68 | static void (*_glDisable)(GLenum cap) = NULL; |
| 69 | static void (*_glDisableVertexAttribArray)(GLuint index) = NULL; |
| 70 | static void (*_glDrawArrays)(GLenum mode, GLint first, GLsizei count) = NULL; |
| 71 | static void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) = NULL; |
| 72 | static void (*_glEnable)(GLenum cap) = NULL; |
| 73 | static void (*_glEnableVertexAttribArray)(GLuint index) = NULL; |
| 74 | static void (*_glFinish)(void) = NULL; |
| 75 | static void (*_glFlush)(void) = NULL; |
| 76 | static void (*_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = NULL; |
| 77 | static void (*_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = NULL; |
| 78 | static void (*_glFrontFace)(GLenum mode) = NULL; |
| 79 | static void (*_glGenBuffers)(GLsizei n, GLuint* buffers) = NULL; |
| 80 | static void (*_glGenerateMipmap)(GLenum target) = NULL; |
| 81 | static void (*_glGenFramebuffers)(GLsizei n, GLuint* framebuffers) = NULL; |
| 82 | static void (*_glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) = NULL; |
| 83 | static void (*_glGenTextures)(GLsizei n, GLuint* textures) = NULL; |
| 84 | static void (*_glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) = NULL; |
| 85 | static void (*_glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) = NULL; |
| 86 | static void (*_glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = NULL; |
| 87 | static int (*_glGetAttribLocation)(GLuint program, const GLchar* name) = NULL; |
| 88 | static void (*_glGetBooleanv)(GLenum pname, GLboolean* params) = NULL; |
| 89 | static void (*_glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL; |
| 90 | static GLenum (*_glGetError)(void) = NULL; |
| 91 | static void (*_glGetFloatv)(GLenum pname, GLfloat* params) = NULL; |
| 92 | static void (*_glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) = NULL; |
| 93 | static void (*_glGetIntegerv)(GLenum pname, GLint* params) = NULL; |
| 94 | static void (*_glGetProgramiv)(GLuint program, GLenum pname, GLint* params) = NULL; |
| 95 | static void (*_glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) = NULL; |
| 96 | static void (*_glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL; |
| 97 | static void (*_glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) = NULL; |
| 98 | static void (*_glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) = NULL; |
| 99 | static void (*_glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = NULL; |
| 100 | static void (*_glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) = NULL; |
| 101 | static const GLubyte* (*_glGetString)(GLenum name) = NULL; |
| 102 | static void (*_glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) = NULL; |
| 103 | static void (*_glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL; |
| 104 | static void (*_glGetUniformfv)(GLuint program, GLint location, GLfloat* params) = NULL; |
| 105 | static void (*_glGetUniformiv)(GLuint program, GLint location, GLint* params) = NULL; |
| 106 | static int (*_glGetUniformLocation)(GLuint program, const GLchar* name) = NULL; |
| 107 | static void (*_glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) = NULL; |
| 108 | static void (*_glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) = NULL; |
| 109 | static void (*_glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) = NULL; |
| 110 | static void (*_glHint)(GLenum target, GLenum mode) = NULL; |
| 111 | static GLboolean (*_glIsBuffer)(GLuint buffer) = NULL; |
| 112 | static GLboolean (*_glIsEnabled)(GLenum cap) = NULL; |
| 113 | static GLboolean (*_glIsFramebuffer)(GLuint framebuffer) = NULL; |
| 114 | static GLboolean (*_glIsProgram)(GLuint program) = NULL; |
| 115 | static GLboolean (*_glIsRenderbuffer)(GLuint renderbuffer) = NULL; |
| 116 | static GLboolean (*_glIsShader)(GLuint shader) = NULL; |
| 117 | static GLboolean (*_glIsTexture)(GLuint texture) = NULL; |
| 118 | static void (*_glLineWidth)(GLfloat width) FP_ATTRIB = NULL; |
| 119 | static void (*_glLinkProgram)(GLuint program) = NULL; |
| 120 | static void (*_glPixelStorei)(GLenum pname, GLint param) = NULL; |
| 121 | static void (*_glPolygonOffset)(GLfloat factor, GLfloat units) FP_ATTRIB = NULL; |
| 122 | static void (*_glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) = NULL; |
| 123 | static void (*_glReleaseShaderCompiler)(void) = NULL; |
| 124 | static void (*_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = NULL; |
| 125 | static void (*_glSampleCoverage)(GLclampf value, GLboolean invert) FP_ATTRIB = NULL; |
| 126 | static void (*_glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL; |
| 127 | static void (*_glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) = NULL; |
| 128 | static void (*_glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) = NULL; |
| 129 | static void (*_glStencilFunc)(GLenum func, GLint ref, GLuint mask) = NULL; |
| 130 | static void (*_glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) = NULL; |
| 131 | static void (*_glStencilMask)(GLuint mask) = NULL; |
| 132 | static void (*_glStencilMaskSeparate)(GLenum face, GLuint mask) = NULL; |
| 133 | static void (*_glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) = NULL; |
| 134 | static void (*_glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = NULL; |
| 135 | static void (*_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) = NULL; |
| 136 | static void (*_glTexParameterf)(GLenum target, GLenum pname, GLfloat param) FP_ATTRIB = NULL; |
| 137 | static void (*_glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) = NULL; |
| 138 | static void (*_glTexParameteri)(GLenum target, GLenum pname, GLint param) = NULL; |
| 139 | static void (*_glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) = NULL; |
| 140 | static void (*_glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) = NULL; |
| 141 | static void (*_glUniform1f)(GLint location, GLfloat x) FP_ATTRIB = NULL; |
| 142 | static void (*_glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) = NULL; |
| 143 | static void (*_glUniform1i)(GLint location, GLint x) = NULL; |
| 144 | static void (*_glUniform1iv)(GLint location, GLsizei count, const GLint* v) = NULL; |
| 145 | static void (*_glUniform2f)(GLint location, GLfloat x, GLfloat y) FP_ATTRIB = NULL; |
| 146 | static void (*_glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) = NULL; |
| 147 | static void (*_glUniform2i)(GLint location, GLint x, GLint y) = NULL; |
| 148 | static void (*_glUniform2iv)(GLint location, GLsizei count, const GLint* v) = NULL; |
| 149 | static void (*_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL; |
| 150 | static void (*_glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) = NULL; |
| 151 | static void (*_glUniform3i)(GLint location, GLint x, GLint y, GLint z) = NULL; |
| 152 | static void (*_glUniform3iv)(GLint location, GLsizei count, const GLint* v) = NULL; |
| 153 | static void (*_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL; |
| 154 | static void (*_glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) = NULL; |
| 155 | static void (*_glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) = NULL; |
| 156 | static void (*_glUniform4iv)(GLint location, GLsizei count, const GLint* v) = NULL; |
| 157 | static void (*_glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; |
| 158 | static void (*_glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; |
| 159 | static void (*_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; |
| 160 | static void (*_glUseProgram)(GLuint program) = NULL; |
| 161 | static void (*_glValidateProgram)(GLuint program) = NULL; |
| 162 | static void (*_glVertexAttrib1f)(GLuint indx, GLfloat x) FP_ATTRIB = NULL; |
| 163 | static void (*_glVertexAttrib1fv)(GLuint indx, const GLfloat* values) = NULL; |
| 164 | static void (*_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) FP_ATTRIB = NULL; |
| 165 | static void (*_glVertexAttrib2fv)(GLuint indx, const GLfloat* values) = NULL; |
| 166 | static void (*_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL; |
| 167 | static void (*_glVertexAttrib3fv)(GLuint indx, const GLfloat* values) = NULL; |
| 168 | static void (*_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL; |
| 169 | static void (*_glVertexAttrib4fv)(GLuint indx, const GLfloat* values) = NULL; |
| 170 | static void (*_glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) = NULL; |
| 171 | static void (*_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL; |
| 172 | static void (*_glEGLImageTargetTexture2DOES) (GLenum target, GLeglImageOES image) = NULL; |
| 173 | |
| 174 | |
| 175 | #define GLES2_LOAD(sym) { *(&_ ## sym) = (void *) android_dlsym(_libglesv2, #sym); } |
| 176 | |
| 177 | static void __attribute__((constructor)) _init_androidglesv2() { |
| 178 | _libglesv2 = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_NOW); |
| 179 | GLES2_LOAD(glActiveTexture); |
| 180 | GLES2_LOAD(glAttachShader); |
| 181 | GLES2_LOAD(glBindAttribLocation); |
| 182 | GLES2_LOAD(glBindBuffer); |
| 183 | GLES2_LOAD(glBindFramebuffer); |
| 184 | GLES2_LOAD(glBindRenderbuffer); |
| 185 | GLES2_LOAD(glBindTexture); |
| 186 | GLES2_LOAD(glBlendColor); |
| 187 | GLES2_LOAD(glBlendEquation); |
| 188 | GLES2_LOAD(glBlendEquationSeparate); |
| 189 | GLES2_LOAD(glBlendFunc); |
| 190 | GLES2_LOAD(glBlendFuncSeparate); |
| 191 | GLES2_LOAD(glBufferData); |
| 192 | GLES2_LOAD(glBufferSubData); |
| 193 | GLES2_LOAD(glCheckFramebufferStatus); |
| 194 | GLES2_LOAD(glClear); |
| 195 | GLES2_LOAD(glClearColor); |
| 196 | GLES2_LOAD(glClearDepthf); |
| 197 | GLES2_LOAD(glClearStencil); |
| 198 | GLES2_LOAD(glColorMask); |
| 199 | GLES2_LOAD(glCompileShader); |
| 200 | GLES2_LOAD(glCompressedTexImage2D); |
| 201 | GLES2_LOAD(glCompressedTexSubImage2D); |
| 202 | GLES2_LOAD(glCopyTexImage2D); |
| 203 | GLES2_LOAD(glCopyTexSubImage2D); |
| 204 | GLES2_LOAD(glCreateProgram); |
| 205 | GLES2_LOAD(glCreateShader); |
| 206 | GLES2_LOAD(glCullFace); |
| 207 | GLES2_LOAD(glDeleteBuffers); |
| 208 | GLES2_LOAD(glDeleteFramebuffers); |
| 209 | GLES2_LOAD(glDeleteProgram); |
| 210 | GLES2_LOAD(glDeleteRenderbuffers); |
| 211 | GLES2_LOAD(glDeleteShader); |
| 212 | GLES2_LOAD(glDeleteTextures); |
| 213 | GLES2_LOAD(glDepthFunc); |
| 214 | GLES2_LOAD(glDepthMask); |
| 215 | GLES2_LOAD(glDepthRangef); |
| 216 | GLES2_LOAD(glDetachShader); |
| 217 | GLES2_LOAD(glDisable); |
| 218 | GLES2_LOAD(glDisableVertexAttribArray); |
| 219 | GLES2_LOAD(glDrawArrays); |
| 220 | GLES2_LOAD(glDrawElements); |
| 221 | GLES2_LOAD(glEnable); |
| 222 | GLES2_LOAD(glEnableVertexAttribArray); |
| 223 | GLES2_LOAD(glFinish); |
| 224 | GLES2_LOAD(glFlush); |
| 225 | GLES2_LOAD(glFramebufferRenderbuffer); |
| 226 | GLES2_LOAD(glFramebufferTexture2D); |
| 227 | GLES2_LOAD(glFrontFace); |
| 228 | GLES2_LOAD(glGenBuffers); |
| 229 | GLES2_LOAD(glGenerateMipmap); |
| 230 | GLES2_LOAD(glGenFramebuffers); |
| 231 | GLES2_LOAD(glGenRenderbuffers); |
| 232 | GLES2_LOAD(glGenTextures); |
| 233 | GLES2_LOAD(glGetActiveAttrib); |
| 234 | GLES2_LOAD(glGetActiveUniform); |
| 235 | GLES2_LOAD(glGetAttachedShaders); |
| 236 | GLES2_LOAD(glGetAttribLocation); |
| 237 | GLES2_LOAD(glGetBooleanv); |
| 238 | GLES2_LOAD(glGetBufferParameteriv); |
| 239 | GLES2_LOAD(glGetError); |
| 240 | GLES2_LOAD(glGetFloatv); |
| 241 | GLES2_LOAD(glGetFramebufferAttachmentParameteriv); |
| 242 | GLES2_LOAD(glGetIntegerv); |
| 243 | GLES2_LOAD(glGetProgramiv); |
| 244 | GLES2_LOAD(glGetProgramInfoLog); |
| 245 | GLES2_LOAD(glGetRenderbufferParameteriv); |
| 246 | GLES2_LOAD(glGetShaderiv); |
| 247 | GLES2_LOAD(glGetShaderInfoLog); |
| 248 | GLES2_LOAD(glGetShaderPrecisionFormat); |
| 249 | GLES2_LOAD(glGetShaderSource); |
| 250 | GLES2_LOAD(glGetString); |
| 251 | GLES2_LOAD(glGetTexParameterfv); |
| 252 | GLES2_LOAD(glGetTexParameteriv); |
| 253 | GLES2_LOAD(glGetUniformfv); |
| 254 | GLES2_LOAD(glGetUniformiv); |
| 255 | GLES2_LOAD(glGetUniformLocation); |
| 256 | GLES2_LOAD(glGetVertexAttribfv); |
| 257 | GLES2_LOAD(glGetVertexAttribiv); |
| 258 | GLES2_LOAD(glGetVertexAttribPointerv); |
| 259 | GLES2_LOAD(glHint); |
| 260 | GLES2_LOAD(glIsBuffer); |
| 261 | GLES2_LOAD(glIsEnabled); |
| 262 | GLES2_LOAD(glIsFramebuffer); |
| 263 | GLES2_LOAD(glIsProgram); |
| 264 | GLES2_LOAD(glIsRenderbuffer); |
| 265 | GLES2_LOAD(glIsShader); |
| 266 | GLES2_LOAD(glIsTexture); |
| 267 | GLES2_LOAD(glLineWidth); |
| 268 | GLES2_LOAD(glLinkProgram); |
| 269 | GLES2_LOAD(glPixelStorei); |
| 270 | GLES2_LOAD(glPolygonOffset); |
| 271 | GLES2_LOAD(glReadPixels); |
| 272 | GLES2_LOAD(glReleaseShaderCompiler); |
| 273 | GLES2_LOAD(glRenderbufferStorage); |
| 274 | GLES2_LOAD(glSampleCoverage); |
| 275 | GLES2_LOAD(glScissor); |
| 276 | GLES2_LOAD(glShaderBinary); |
| 277 | GLES2_LOAD(glShaderSource); |
| 278 | GLES2_LOAD(glStencilFunc); |
| 279 | GLES2_LOAD(glStencilFuncSeparate); |
| 280 | GLES2_LOAD(glStencilMask); |
| 281 | GLES2_LOAD(glStencilMaskSeparate); |
| 282 | GLES2_LOAD(glStencilOp); |
| 283 | GLES2_LOAD(glStencilOpSeparate); |
| 284 | GLES2_LOAD(glTexImage2D); |
| 285 | GLES2_LOAD(glTexParameterf); |
| 286 | GLES2_LOAD(glTexParameterfv); |
| 287 | GLES2_LOAD(glTexParameteri); |
| 288 | GLES2_LOAD(glTexParameteriv); |
| 289 | GLES2_LOAD(glTexSubImage2D); |
| 290 | GLES2_LOAD(glUniform1f); |
| 291 | GLES2_LOAD(glUniform1fv); |
| 292 | GLES2_LOAD(glUniform1i); |
| 293 | GLES2_LOAD(glUniform1iv); |
| 294 | GLES2_LOAD(glUniform2f); |
| 295 | GLES2_LOAD(glUniform2fv); |
| 296 | GLES2_LOAD(glUniform2i); |
| 297 | GLES2_LOAD(glUniform2iv); |
| 298 | GLES2_LOAD(glUniform3f); |
| 299 | GLES2_LOAD(glUniform3fv); |
| 300 | GLES2_LOAD(glUniform3i); |
| 301 | GLES2_LOAD(glUniform3iv); |
| 302 | GLES2_LOAD(glUniform4f); |
| 303 | GLES2_LOAD(glUniform4fv); |
| 304 | GLES2_LOAD(glUniform4i); |
| 305 | GLES2_LOAD(glUniform4iv); |
| 306 | GLES2_LOAD(glUniformMatrix2fv); |
| 307 | GLES2_LOAD(glUniformMatrix3fv); |
| 308 | GLES2_LOAD(glUniformMatrix4fv); |
| 309 | GLES2_LOAD(glUseProgram); |
| 310 | GLES2_LOAD(glValidateProgram); |
| 311 | GLES2_LOAD(glVertexAttrib1f); |
| 312 | GLES2_LOAD(glVertexAttrib1fv); |
| 313 | GLES2_LOAD(glVertexAttrib2f); |
| 314 | GLES2_LOAD(glVertexAttrib2fv); |
| 315 | GLES2_LOAD(glVertexAttrib3f); |
| 316 | GLES2_LOAD(glVertexAttrib3fv); |
| 317 | GLES2_LOAD(glVertexAttrib4f); |
| 318 | GLES2_LOAD(glVertexAttrib4fv); |
| 319 | GLES2_LOAD(glVertexAttribPointer); |
| 320 | GLES2_LOAD(glViewport); |
| 321 | GLES2_LOAD(glEGLImageTargetTexture2DOES); |
| 322 | |
| 323 | } |
| 324 | |
| 325 | |
| 326 | void glActiveTexture (GLenum texture) |
| 327 | { |
| 328 | return (*_glActiveTexture)(texture); |
| 329 | } |
| 330 | |
| 331 | void glAttachShader (GLuint program, GLuint shader) |
| 332 | { |
| 333 | return (*_glAttachShader)(program, shader); |
| 334 | } |
| 335 | |
| 336 | void glBindAttribLocation (GLuint program, GLuint index, const GLchar* name) |
| 337 | { |
| 338 | return (*_glBindAttribLocation)(program, index, name); |
| 339 | } |
| 340 | |
| 341 | void glBindBuffer (GLenum target, GLuint buffer) |
| 342 | { |
| 343 | return (*_glBindBuffer)(target, buffer); |
| 344 | } |
| 345 | |
| 346 | void glBindFramebuffer (GLenum target, GLuint framebuffer) |
| 347 | { |
| 348 | return (*_glBindFramebuffer)(target, framebuffer); |
| 349 | } |
| 350 | |
| 351 | void glBindRenderbuffer (GLenum target, GLuint renderbuffer) |
| 352 | { |
| 353 | return (*_glBindRenderbuffer)(target, renderbuffer); |
| 354 | } |
| 355 | |
| 356 | void glBindTexture (GLenum target, GLuint texture) |
| 357 | { |
| 358 | return (*_glBindTexture)(target, texture); |
| 359 | } |
| 360 | |
| 361 | void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
| 362 | { |
| 363 | return (*_glBlendColor)(red, green, blue, alpha); |
| 364 | } |
| 365 | |
| 366 | void glBlendEquation ( GLenum mode ) |
| 367 | { |
| 368 | return (*_glBlendEquation)(mode); |
| 369 | } |
| 370 | |
| 371 | void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha) |
| 372 | { |
| 373 | return (*_glBlendEquationSeparate)(modeRGB, modeAlpha); |
| 374 | } |
| 375 | |
| 376 | void glBlendFunc (GLenum sfactor, GLenum dfactor) |
| 377 | { |
| 378 | return (*_glBlendFunc)(sfactor, dfactor); |
| 379 | } |
| 380 | |
| 381 | void glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) |
| 382 | { |
| 383 | return (*_glBlendFuncSeparate)(srcRGB, dstRGB, srcAlpha, dstAlpha); |
| 384 | } |
| 385 | |
| 386 | void glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) |
| 387 | { |
| 388 | return (*_glBufferData)(target, size, data, usage); |
| 389 | } |
| 390 | |
| 391 | void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) |
| 392 | { |
| 393 | return (*_glBufferSubData)(target, offset, size, data); |
| 394 | } |
| 395 | |
| 396 | GLenum glCheckFramebufferStatus (GLenum target) |
| 397 | { |
| 398 | return (*_glCheckFramebufferStatus)(target); |
| 399 | } |
| 400 | |
| 401 | void glClear (GLbitfield mask) |
| 402 | { |
| 403 | return (*_glClear)(mask); |
| 404 | } |
| 405 | |
| 406 | void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
| 407 | { |
| 408 | return (*_glClearColor)(red, green, blue, alpha); |
| 409 | } |
| 410 | |
| 411 | void glClearDepthf (GLclampf depth) |
| 412 | { |
| 413 | return (*_glClearDepthf)(depth); |
| 414 | } |
| 415 | |
| 416 | void glClearStencil (GLint s) |
| 417 | { |
| 418 | return (*_glClearStencil)(s); |
| 419 | } |
| 420 | |
| 421 | void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) |
| 422 | { |
| 423 | return (*_glColorMask)(red, green, blue, alpha); |
| 424 | } |
| 425 | |
| 426 | void glCompileShader (GLuint shader) |
| 427 | { |
| 428 | return (*_glCompileShader)(shader); |
| 429 | } |
| 430 | |
| 431 | void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) |
| 432 | { |
| 433 | return (*_glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data); |
| 434 | } |
| 435 | |
| 436 | void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) |
| 437 | { |
| 438 | return (*_glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data); |
| 439 | } |
| 440 | |
| 441 | void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) |
| 442 | { |
| 443 | return (*_glCopyTexImage2D)(target, level, internalformat, x, y, width, height, border); |
| 444 | } |
| 445 | |
| 446 | void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) |
| 447 | { |
| 448 | return (*_glCopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height); |
| 449 | } |
| 450 | |
| 451 | GLuint glCreateProgram (void) |
| 452 | { |
| 453 | return (*_glCreateProgram)(); |
| 454 | } |
| 455 | |
| 456 | GLuint glCreateShader (GLenum type) |
| 457 | { |
| 458 | return (*_glCreateShader)(type); |
| 459 | } |
| 460 | |
| 461 | void glCullFace (GLenum mode) |
| 462 | { |
| 463 | return (*_glCullFace)(mode); |
| 464 | } |
| 465 | |
| 466 | void glDeleteBuffers (GLsizei n, const GLuint* buffers) |
| 467 | { |
| 468 | return (*_glDeleteBuffers)(n, buffers); |
| 469 | } |
| 470 | |
| 471 | void glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers) |
| 472 | { |
| 473 | return (*_glDeleteFramebuffers)(n, framebuffers); |
| 474 | } |
| 475 | |
| 476 | void glDeleteProgram (GLuint program) |
| 477 | { |
| 478 | return (*_glDeleteProgram)(program); |
| 479 | } |
| 480 | |
| 481 | void glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers) |
| 482 | { |
| 483 | return (*_glDeleteRenderbuffers)(n, renderbuffers); |
| 484 | } |
| 485 | |
| 486 | void glDeleteShader (GLuint shader) |
| 487 | { |
| 488 | return (*_glDeleteShader)(shader); |
| 489 | } |
| 490 | |
| 491 | void glDeleteTextures (GLsizei n, const GLuint* textures) |
| 492 | { |
| 493 | return (*_glDeleteTextures)(n, textures); |
| 494 | } |
| 495 | |
| 496 | void glDepthFunc (GLenum func) |
| 497 | { |
| 498 | return (*_glDepthFunc)(func); |
| 499 | } |
| 500 | |
| 501 | void glDepthMask (GLboolean flag) |
| 502 | { |
| 503 | return (*_glDepthMask)(flag); |
| 504 | } |
| 505 | |
| 506 | void glDepthRangef (GLclampf zNear, GLclampf zFar) |
| 507 | { |
| 508 | return (*_glDepthRangef)(zNear, zFar); |
| 509 | } |
| 510 | |
| 511 | void glDetachShader (GLuint program, GLuint shader) |
| 512 | { |
| 513 | return (*_glDetachShader)(program, shader); |
| 514 | } |
| 515 | |
| 516 | void glDisable (GLenum cap) |
| 517 | { |
| 518 | return (*_glDisable)(cap); |
| 519 | } |
| 520 | |
| 521 | void glDisableVertexAttribArray (GLuint index) |
| 522 | { |
| 523 | return (*_glDisableVertexAttribArray)(index); |
| 524 | } |
| 525 | |
| 526 | void glDrawArrays (GLenum mode, GLint first, GLsizei count) |
| 527 | { |
| 528 | return (*_glDrawArrays)(mode, first, count); |
| 529 | } |
| 530 | |
| 531 | void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) |
| 532 | { |
| 533 | return (*_glDrawElements)(mode, count, type, indices); |
| 534 | } |
| 535 | |
| 536 | void glEnable (GLenum cap) |
| 537 | { |
| 538 | return (*_glEnable)(cap); |
| 539 | } |
| 540 | |
| 541 | void glEnableVertexAttribArray (GLuint index) |
| 542 | { |
| 543 | return (*_glEnableVertexAttribArray)(index); |
| 544 | } |
| 545 | |
| 546 | void glFinish (void) |
| 547 | { |
| 548 | return (*_glFinish)(); |
| 549 | } |
| 550 | |
| 551 | void glFlush (void) |
| 552 | { |
| 553 | return (*_glFlush)(); |
| 554 | } |
| 555 | |
| 556 | void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
| 557 | { |
| 558 | return (*_glFramebufferRenderbuffer)(target, attachment, renderbuffertarget, renderbuffer); |
| 559 | } |
| 560 | |
| 561 | void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
| 562 | { |
| 563 | return (*_glFramebufferTexture2D)(target, attachment, textarget, texture, level); |
| 564 | } |
| 565 | |
| 566 | void glFrontFace (GLenum mode) |
| 567 | { |
| 568 | return (*_glFrontFace)(mode); |
| 569 | } |
| 570 | |
| 571 | void glGenBuffers (GLsizei n, GLuint* buffers) |
| 572 | { |
| 573 | return (*_glGenBuffers)(n, buffers); |
| 574 | } |
| 575 | |
| 576 | void glGenerateMipmap (GLenum target) |
| 577 | { |
| 578 | return (*_glGenerateMipmap)(target); |
| 579 | } |
| 580 | |
| 581 | void glGenFramebuffers (GLsizei n, GLuint* framebuffers) |
| 582 | { |
| 583 | return (*_glGenFramebuffers)(n, framebuffers); |
| 584 | } |
| 585 | |
| 586 | void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers) |
| 587 | { |
| 588 | return (*_glGenRenderbuffers)(n, renderbuffers); |
| 589 | } |
| 590 | |
| 591 | void glGenTextures (GLsizei n, GLuint* textures) |
| 592 | { |
| 593 | return (*_glGenTextures)(n, textures); |
| 594 | } |
| 595 | |
| 596 | void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) |
| 597 | { |
| 598 | return (*_glGetActiveAttrib)(program, index, bufsize, length, size, type, name); |
| 599 | } |
| 600 | |
| 601 | void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) |
| 602 | { |
| 603 | return (*_glGetActiveUniform)(program, index, bufsize, length, size, type, name); |
| 604 | } |
| 605 | |
| 606 | void glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) |
| 607 | { |
| 608 | return (*_glGetAttachedShaders)(program, maxcount, count, shaders); |
| 609 | } |
| 610 | |
| 611 | int glGetAttribLocation (GLuint program, const GLchar* name) |
| 612 | { |
| 613 | return (*_glGetAttribLocation)(program, name); |
| 614 | } |
| 615 | |
| 616 | void glGetBooleanv (GLenum pname, GLboolean* params) |
| 617 | { |
| 618 | return (*_glGetBooleanv)(pname, params); |
| 619 | } |
| 620 | |
| 621 | void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params) |
| 622 | { |
| 623 | return (*_glGetBufferParameteriv)(target, pname, params); |
| 624 | } |
| 625 | |
| 626 | GLenum glGetError (void) |
| 627 | { |
| 628 | return (*_glGetError)(); |
| 629 | } |
| 630 | |
| 631 | void glGetFloatv (GLenum pname, GLfloat* params) |
| 632 | { |
| 633 | return (*_glGetFloatv)(pname, params); |
| 634 | } |
| 635 | |
| 636 | void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params) |
| 637 | { |
| 638 | return (*_glGetFramebufferAttachmentParameteriv)(target, attachment, pname, params); |
| 639 | } |
| 640 | |
| 641 | void glGetIntegerv (GLenum pname, GLint* params) |
| 642 | { |
| 643 | return (*_glGetIntegerv)(pname, params); |
| 644 | } |
| 645 | |
| 646 | void glGetProgramiv (GLuint program, GLenum pname, GLint* params) |
| 647 | { |
| 648 | return (*_glGetProgramiv)(program, pname, params); |
| 649 | } |
| 650 | |
| 651 | void glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) |
| 652 | { |
| 653 | return (*_glGetProgramInfoLog)(program, bufsize, length, infolog); |
| 654 | } |
| 655 | |
| 656 | void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params) |
| 657 | { |
| 658 | return (*_glGetRenderbufferParameteriv)(target, pname, params); |
| 659 | } |
| 660 | |
| 661 | void glGetShaderiv (GLuint shader, GLenum pname, GLint* params) |
| 662 | { |
| 663 | return (*_glGetShaderiv)(shader, pname, params); |
| 664 | } |
| 665 | |
| 666 | void glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) |
| 667 | { |
| 668 | return (*_glGetShaderInfoLog)(shader, bufsize, length, infolog); |
| 669 | } |
| 670 | |
| 671 | void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) |
| 672 | { |
| 673 | return (*_glGetShaderPrecisionFormat)(shadertype, precisiontype, range, precision); |
| 674 | } |
| 675 | |
| 676 | void glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) |
| 677 | { |
| 678 | return (*_glGetShaderSource)(shader, bufsize, length, source); |
| 679 | } |
| 680 | |
| 681 | const GLubyte* glGetString (GLenum name) |
| 682 | { |
| 683 | return (*_glGetString)(name); |
| 684 | } |
| 685 | |
| 686 | void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params) |
| 687 | { |
| 688 | return (*_glGetTexParameterfv)(target, pname, params); |
| 689 | } |
| 690 | |
| 691 | void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params) |
| 692 | { |
| 693 | return (*_glGetTexParameteriv)(target, pname, params); |
| 694 | } |
| 695 | |
| 696 | void glGetUniformfv (GLuint program, GLint location, GLfloat* params) |
| 697 | { |
| 698 | return (*_glGetUniformfv)(program, location, params); |
| 699 | } |
| 700 | |
| 701 | void glGetUniformiv (GLuint program, GLint location, GLint* params) |
| 702 | { |
| 703 | return (*_glGetUniformiv)(program, location, params); |
| 704 | } |
| 705 | |
| 706 | int glGetUniformLocation (GLuint program, const GLchar* name) |
| 707 | { |
| 708 | return (*_glGetUniformLocation)(program, name); |
| 709 | } |
| 710 | |
| 711 | void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params) |
| 712 | { |
| 713 | return (*_glGetVertexAttribfv)(index, pname, params); |
| 714 | } |
| 715 | |
| 716 | void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params) |
| 717 | { |
| 718 | return (*_glGetVertexAttribiv)(index, pname, params); |
| 719 | } |
| 720 | |
| 721 | void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer) |
| 722 | { |
| 723 | return (*_glGetVertexAttribPointerv)(index, pname, pointer); |
| 724 | } |
| 725 | |
| 726 | void glHint (GLenum target, GLenum mode) |
| 727 | { |
| 728 | return (*_glHint)(target, mode); |
| 729 | } |
| 730 | |
| 731 | GLboolean glIsBuffer (GLuint buffer) |
| 732 | { |
| 733 | return (*_glIsBuffer)(buffer); |
| 734 | } |
| 735 | |
| 736 | GLboolean glIsEnabled (GLenum cap) |
| 737 | { |
| 738 | return (*_glIsEnabled)(cap); |
| 739 | } |
| 740 | |
| 741 | GLboolean glIsFramebuffer (GLuint framebuffer) |
| 742 | { |
| 743 | return (*_glIsFramebuffer)(framebuffer); |
| 744 | } |
| 745 | |
| 746 | GLboolean glIsProgram (GLuint program) |
| 747 | { |
| 748 | return (*_glIsProgram)(program); |
| 749 | } |
| 750 | |
| 751 | GLboolean glIsRenderbuffer (GLuint renderbuffer) |
| 752 | { |
| 753 | return (*_glIsRenderbuffer)(renderbuffer); |
| 754 | } |
| 755 | |
| 756 | GLboolean glIsShader (GLuint shader) |
| 757 | { |
| 758 | return (*_glIsShader)(shader); |
| 759 | } |
| 760 | |
| 761 | GLboolean glIsTexture (GLuint texture) |
| 762 | { |
| 763 | return (*_glIsTexture)(texture); |
| 764 | } |
| 765 | |
| 766 | void glLineWidth (GLfloat width) |
| 767 | { |
| 768 | return (*_glLineWidth)(width); |
| 769 | } |
| 770 | |
| 771 | void glLinkProgram (GLuint program) |
| 772 | { |
| 773 | return (*_glLinkProgram)(program); |
| 774 | } |
| 775 | |
| 776 | void glPixelStorei (GLenum pname, GLint param) |
| 777 | { |
| 778 | return (*_glPixelStorei)(pname, param); |
| 779 | } |
| 780 | |
| 781 | void glPolygonOffset (GLfloat factor, GLfloat units) |
| 782 | { |
| 783 | return (*_glPolygonOffset)(factor, units); |
| 784 | } |
| 785 | |
| 786 | void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) |
| 787 | { |
| 788 | return (*_glReadPixels)(x, y, width, height, format, type, pixels); |
| 789 | |
| 790 | } |
| 791 | |
| 792 | void glReleaseShaderCompiler (void) |
| 793 | { |
| 794 | return (*_glReleaseShaderCompiler)(); |
| 795 | } |
| 796 | |
| 797 | void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) |
| 798 | { |
| 799 | return (*_glRenderbufferStorage)(target, internalformat, width, height); |
| 800 | } |
| 801 | |
| 802 | void glSampleCoverage (GLclampf value, GLboolean invert) |
| 803 | { |
| 804 | return (*_glSampleCoverage)(value, invert); |
| 805 | } |
| 806 | |
| 807 | void glScissor (GLint x, GLint y, GLsizei width, GLsizei height) |
| 808 | { |
| 809 | return (*_glScissor)(x, y, width, height); |
| 810 | } |
| 811 | |
| 812 | void glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) |
| 813 | { |
| 814 | return (*_glShaderBinary)(n, shaders, binaryformat, binary, length); |
| 815 | } |
| 816 | |
| 817 | void glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length) |
| 818 | { |
| 819 | return (*_glShaderSource)(shader, count, string, length); |
| 820 | } |
| 821 | |
| 822 | void glStencilFunc (GLenum func, GLint ref, GLuint mask) |
| 823 | { |
| 824 | return (*_glStencilFunc)(func, ref, mask); |
| 825 | } |
| 826 | |
| 827 | void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask) |
| 828 | { |
| 829 | return (*_glStencilFuncSeparate)(face, func, ref, mask); |
| 830 | } |
| 831 | |
| 832 | void glStencilMask (GLuint mask) |
| 833 | { |
| 834 | return (*_glStencilMask)(mask); |
| 835 | } |
| 836 | |
| 837 | void glStencilMaskSeparate (GLenum face, GLuint mask) |
| 838 | { |
| 839 | return (*_glStencilMaskSeparate)(face, mask); |
| 840 | } |
| 841 | |
| 842 | void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass) |
| 843 | { |
| 844 | return (*_glStencilOp)(fail, zfail, zpass); |
| 845 | } |
| 846 | |
| 847 | void glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass) |
| 848 | { |
| 849 | return (*_glStencilOpSeparate)(face, fail, zfail, zpass); |
| 850 | } |
| 851 | |
| 852 | void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) |
| 853 | { |
| 854 | return (*_glTexImage2D)(target, level, internalformat, width, height, border, format, type, pixels); |
| 855 | } |
| 856 | |
| 857 | void glTexParameterf (GLenum target, GLenum pname, GLfloat param) |
| 858 | { |
| 859 | return (*_glTexParameterf)(target, pname, param); |
| 860 | } |
| 861 | |
| 862 | void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params) |
| 863 | { |
| 864 | return (*_glTexParameterfv)(target, pname, params); |
| 865 | } |
| 866 | |
| 867 | void glTexParameteri (GLenum target, GLenum pname, GLint param) |
| 868 | { |
| 869 | return (*_glTexParameteri)(target, pname, param); |
| 870 | } |
| 871 | |
| 872 | void glTexParameteriv (GLenum target, GLenum pname, const GLint* params) |
| 873 | { |
| 874 | return (*_glTexParameteriv)(target, pname, params); |
| 875 | } |
| 876 | |
| 877 | void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) |
| 878 | { |
| 879 | return (*_glTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels); |
| 880 | } |
| 881 | |
| 882 | void glUniform1f (GLint location, GLfloat x) |
| 883 | { |
| 884 | return (*_glUniform1f)(location, x); |
| 885 | } |
| 886 | |
| 887 | void glUniform1fv (GLint location, GLsizei count, const GLfloat* v) |
| 888 | { |
| 889 | return (*_glUniform1fv)(location, count, v); |
| 890 | } |
| 891 | |
| 892 | void glUniform1i (GLint location, GLint x) |
| 893 | { |
| 894 | return (*_glUniform1i)(location, x); |
| 895 | } |
| 896 | |
| 897 | void glUniform1iv (GLint location, GLsizei count, const GLint* v) |
| 898 | { |
| 899 | return (*_glUniform1iv)(location, count, v); |
| 900 | } |
| 901 | |
| 902 | void glUniform2f (GLint location, GLfloat x, GLfloat y) |
| 903 | { |
| 904 | return (*_glUniform2f)(location, x, y); |
| 905 | } |
| 906 | |
| 907 | void glUniform2fv (GLint location, GLsizei count, const GLfloat* v) |
| 908 | { |
| 909 | return (*_glUniform2fv)(location, count, v); |
| 910 | } |
| 911 | |
| 912 | void glUniform2i (GLint location, GLint x, GLint y) |
| 913 | { |
| 914 | return (*_glUniform2i)(location, x, y); |
| 915 | } |
| 916 | |
| 917 | void glUniform2iv (GLint location, GLsizei count, const GLint* v) |
| 918 | { |
| 919 | return (*_glUniform2iv)(location, count, v); |
| 920 | } |
| 921 | |
| 922 | void glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z) |
| 923 | { |
| 924 | return (*_glUniform3f)(location, x, y, z); |
| 925 | } |
| 926 | |
| 927 | void glUniform3fv (GLint location, GLsizei count, const GLfloat* v) |
| 928 | { |
| 929 | return (*_glUniform3fv)(location, count, v); |
| 930 | } |
| 931 | |
| 932 | void glUniform3i (GLint location, GLint x, GLint y, GLint z) |
| 933 | { |
| 934 | return (*_glUniform3i)(location, x, y, z); |
| 935 | } |
| 936 | |
| 937 | void glUniform3iv (GLint location, GLsizei count, const GLint* v) |
| 938 | { |
| 939 | return (*_glUniform3iv)(location, count, v); |
| 940 | } |
| 941 | |
| 942 | void glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| 943 | { |
| 944 | return (*_glUniform4f)(location, x, y, z, w); |
| 945 | } |
| 946 | |
| 947 | void glUniform4fv (GLint location, GLsizei count, const GLfloat* v) |
| 948 | { |
| 949 | return (*_glUniform4fv)(location, count, v); |
| 950 | } |
| 951 | |
| 952 | void glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w) |
| 953 | { |
| 954 | return (*_glUniform4i)(location, x, y, z, w); |
| 955 | } |
| 956 | |
| 957 | void glUniform4iv (GLint location, GLsizei count, const GLint* v) |
| 958 | { |
| 959 | return (*_glUniform4iv)(location, count, v); |
| 960 | } |
| 961 | |
| 962 | void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
| 963 | { |
| 964 | return (*_glUniformMatrix2fv)(location, count, transpose, value); |
| 965 | } |
| 966 | |
| 967 | void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
| 968 | { |
| 969 | return (*_glUniformMatrix3fv)(location, count, transpose, value); |
| 970 | } |
| 971 | |
| 972 | void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
| 973 | { |
| 974 | return (*_glUniformMatrix4fv)(location, count, transpose, value); |
| 975 | } |
| 976 | |
| 977 | void glUseProgram (GLuint program) |
| 978 | { |
| 979 | return (*_glUseProgram)(program); |
| 980 | } |
| 981 | |
| 982 | void glValidateProgram (GLuint program) |
| 983 | { |
| 984 | return (*_glValidateProgram)(program); |
| 985 | } |
| 986 | |
| 987 | void glVertexAttrib1f (GLuint indx, GLfloat x) |
| 988 | { |
| 989 | return (*_glVertexAttrib1f)(indx, x); |
| 990 | } |
| 991 | |
| 992 | void glVertexAttrib1fv (GLuint indx, const GLfloat* values) |
| 993 | { |
| 994 | return (*_glVertexAttrib1fv)(indx, values); |
| 995 | } |
| 996 | |
| 997 | void glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y) |
| 998 | { |
| 999 | return (*_glVertexAttrib2f)(indx, x, y); |
| 1000 | } |
| 1001 | |
| 1002 | void glVertexAttrib2fv (GLuint indx, const GLfloat* values) |
| 1003 | { |
| 1004 | return (*_glVertexAttrib2fv)(indx, values); |
| 1005 | } |
| 1006 | |
| 1007 | void glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z) |
| 1008 | { |
| 1009 | return (*_glVertexAttrib3f)(indx, x, y, z); |
| 1010 | } |
| 1011 | |
| 1012 | void glVertexAttrib3fv (GLuint indx, const GLfloat* values) |
| 1013 | { |
| 1014 | return (*_glVertexAttrib3fv)(indx, values); |
| 1015 | } |
| 1016 | |
| 1017 | void glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| 1018 | { |
| 1019 | return (*_glVertexAttrib4f)(indx, x, y, z, w); |
| 1020 | } |
| 1021 | |
| 1022 | void glVertexAttrib4fv (GLuint indx, const GLfloat* values) |
| 1023 | { |
| 1024 | return (*_glVertexAttrib4fv)(indx, values); |
| 1025 | } |
| 1026 | |
| 1027 | void glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) |
| 1028 | { |
| 1029 | return (*_glVertexAttribPointer)(indx, size, type, normalized, stride, ptr); |
| 1030 | } |
| 1031 | |
| 1032 | void glViewport (GLint x, GLint y, GLsizei width, GLsizei height) |
| 1033 | { |
| 1034 | return (*_glViewport)(x, y, width, height); |
| 1035 | } |
| 1036 | |
| 1037 | void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) |
| 1038 | { |
| 1039 | (*_glEGLImageTargetTexture2DOES)(target, image); |
| 1040 | } |
| 1041 | |
| 1042 | |