1 /* 2 * Copyright (C) 2011 The Android Open Source Project 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 #ifndef GLDISPATCHH 17 #define GLDISPATCHH 18 19 #include <GLES/gl.h> 20 #include <GLES2/gl2.h> 21 #include <utils/threads.h> 22 #include "gldefs.h" 23 #include "GLutils.h" 24 25 #define GLAPIENTRY GL_APIENTRY 26 typedef void(*FUNCPTR)(); 27 28 class GLDispatch 29 { 30 public: 31 32 GLDispatch(); 33 void dispatchFuncs(GLESVersion version); 34 35 /* OpenGL functions which are needed for implementing BOTH GLES 1.1 & GLES 2.0*/ 36 static void (GLAPIENTRY *glActiveTexture) ( GLenum texture ); 37 static void (GLAPIENTRY *glBindBuffer) (GLenum target, GLuint buffer); 38 static void (GLAPIENTRY *glBindTexture) (GLenum target, GLuint texture); 39 static void (GLAPIENTRY *glBlendFunc) (GLenum sfactor, GLenum dfactor); 40 static void (GLAPIENTRY *glBlendEquation)( GLenum mode ); 41 static void (GLAPIENTRY *glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha); 42 static void (GLAPIENTRY *glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); 43 static void (GLAPIENTRY *glBufferData) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); 44 static void (GLAPIENTRY *glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); 45 static void (GLAPIENTRY *glClear) (GLbitfield mask); 46 static void (GLAPIENTRY *glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 47 static void (GLAPIENTRY *glClearStencil) (GLint s); 48 static void (GLAPIENTRY *glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); 49 static void (GLAPIENTRY *glCompressedTexImage2D) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); 50 static void (GLAPIENTRY *glCompressedTexSubImage2D) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); 51 static void (GLAPIENTRY *glCopyTexImage2D) (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); 52 static void (GLAPIENTRY *glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); 53 static void (GLAPIENTRY *glCullFace) (GLenum mode); 54 static void (GLAPIENTRY *glDeleteBuffers) (GLsizei n, const GLuint *buffers); 55 static void (GLAPIENTRY *glDeleteTextures) (GLsizei n, const GLuint *textures); 56 static void (GLAPIENTRY *glDepthFunc) (GLenum func); 57 static void (GLAPIENTRY *glDepthMask) (GLboolean flag); 58 static void (GLAPIENTRY *glDepthRange) (GLclampd zNear, GLclampd zFar); 59 static void (GLAPIENTRY *glDisable) (GLenum cap); 60 static void (GLAPIENTRY *glDrawArrays) (GLenum mode, GLint first, GLsizei count); 61 static void (GLAPIENTRY *glDrawElements) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); 62 static void (GLAPIENTRY *glEnable) (GLenum cap); 63 static void (GLAPIENTRY *glFinish) (void); 64 static void (GLAPIENTRY *glFlush) (void); 65 static void (GLAPIENTRY *glFrontFace) (GLenum mode); 66 static void (GLAPIENTRY *glGenBuffers) (GLsizei n, GLuint *buffers); 67 static void (GLAPIENTRY *glGenTextures) (GLsizei n, GLuint *textures); 68 static void (GLAPIENTRY *glGetBooleanv) (GLenum pname, GLboolean *params); 69 static void (GLAPIENTRY *glGetBufferParameteriv) (GLenum, GLenum, GLint *); 70 static GLenum (GLAPIENTRY *glGetError) (void); 71 static void (GLAPIENTRY *glGetFloatv) (GLenum pname, GLfloat *params); 72 static void (GLAPIENTRY *glGetIntegerv) (GLenum pname, GLint *params); 73 static const GLubyte * (GLAPIENTRY *glGetString) (GLenum name); 74 static void (GLAPIENTRY *glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat *params); 75 static void (GLAPIENTRY *glGetTexParameteriv) (GLenum target, GLenum pname, GLint *params); 76 static void (GLAPIENTRY *glGetTexLevelParameteriv) (GLenum target, GLint level, GLenum pname, GLint *params); 77 static void (GLAPIENTRY *glHint) (GLenum target, GLenum mode); 78 static GLboolean (GLAPIENTRY *glIsBuffer) (GLuint); 79 static GLboolean (GLAPIENTRY *glIsEnabled) (GLenum cap); 80 static GLboolean (GLAPIENTRY *glIsTexture) (GLuint texture); 81 static void (GLAPIENTRY *glLineWidth) (GLfloat width); 82 static void (GLAPIENTRY *glPolygonOffset) (GLfloat factor, GLfloat units); 83 static void (GLAPIENTRY *glPixelStorei) (GLenum pname, GLint param); 84 static void (GLAPIENTRY *glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); 85 static void (GLAPIENTRY *glSampleCoverage) ( GLclampf value, GLboolean invert ); 86 static void (GLAPIENTRY *glScissor) (GLint x, GLint y, GLsizei width, GLsizei height); 87 static void (GLAPIENTRY *glStencilFunc) (GLenum func, GLint ref, GLuint mask); 88 static void (GLAPIENTRY *glStencilMask) (GLuint mask); 89 static void (GLAPIENTRY *glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass); 90 static void (GLAPIENTRY *glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); 91 static void (GLAPIENTRY *glTexParameteri) (GLenum target, GLenum pname, GLint param); 92 static void (GLAPIENTRY *glTexParameteriv) (GLenum target, GLenum pname, const GLint *params); 93 static void (GLAPIENTRY *glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); 94 static void (GLAPIENTRY *glViewport) (GLint x, GLint y, GLsizei width, GLsizei height); 95 static void (GLAPIENTRY *glPushAttrib) ( GLbitfield mask ); 96 static void (GLAPIENTRY *glPopAttrib) ( void ); 97 static void (GLAPIENTRY *glPushClientAttrib) ( GLbitfield mask ); 98 static void (GLAPIENTRY *glPopClientAttrib) ( void ); 99 static GLboolean (GLAPIENTRY *glIsRenderbufferEXT) (GLuint renderbuffer); 100 static void (GLAPIENTRY *glBindRenderbufferEXT) (GLenum target, GLuint renderbuffer); 101 static void (GLAPIENTRY *glDeleteRenderbuffersEXT) (GLsizei n, const GLuint *renderbuffers); 102 static void (GLAPIENTRY *glGenRenderbuffersEXT) (GLsizei n, GLuint *renderbuffers); 103 static void (GLAPIENTRY *glRenderbufferStorageEXT) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); 104 static void (GLAPIENTRY *glGetRenderbufferParameterivEXT) (GLenum target, GLenum pname, GLint *params); 105 static GLboolean (GLAPIENTRY *glIsFramebufferEXT) (GLuint framebuffer); 106 static void (GLAPIENTRY *glBindFramebufferEXT) (GLenum target, GLuint framebuffer); 107 static void (GLAPIENTRY *glDeleteFramebuffersEXT) (GLsizei n, const GLuint *framebuffers); 108 static void (GLAPIENTRY *glGenFramebuffersEXT) (GLsizei n, GLuint *framebuffers); 109 static GLenum (GLAPIENTRY *glCheckFramebufferStatusEXT) (GLenum target); 110 static void (GLAPIENTRY *glFramebufferTexture1DEXT) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); 111 static void (GLAPIENTRY *glFramebufferTexture2DEXT) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); 112 static void (GLAPIENTRY *glFramebufferTexture3DEXT) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); 113 static void (GLAPIENTRY *glFramebufferRenderbufferEXT) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); 114 static void (GLAPIENTRY *glGetFramebufferAttachmentParameterivEXT) (GLenum target, GLenum attachment, GLenum pname, GLint *params); 115 static void (GLAPIENTRY *glGenerateMipmapEXT) (GLenum target); 116 117 /* OpenGL functions which are needed ONLY for implementing GLES 1.1*/ 118 static void (GLAPIENTRY *glAlphaFunc) (GLenum func, GLclampf ref); 119 static void (GLAPIENTRY *glBegin)( GLenum mode ); 120 static void (GLAPIENTRY *glClearDepth) (GLclampd depth); 121 static void (GLAPIENTRY *glClientActiveTexture) ( GLenum texture ); 122 static void (GLAPIENTRY *glClipPlane) (GLenum plane, const GLdouble *equation); 123 static void (GLAPIENTRY *glColor4d) (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); 124 static void (GLAPIENTRY *glColor4f) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); 125 static void (GLAPIENTRY *glColor4fv) ( const GLfloat *v ); 126 static void (GLAPIENTRY *glColor4ub) (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); 127 static void (GLAPIENTRY *glColor4ubv) ( const GLubyte *v ); 128 static void (GLAPIENTRY *glColorPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); 129 static void (GLAPIENTRY *glDisableClientState) (GLenum array); 130 static void (GLAPIENTRY *glEnableClientState) (GLenum array); 131 static void (GLAPIENTRY *glEnd) (void); 132 static void (GLAPIENTRY *glFogf) (GLenum pname, GLfloat param); 133 static void (GLAPIENTRY *glFogfv) (GLenum pname, const GLfloat *params); 134 static void (GLAPIENTRY *glFrustum) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); 135 static void (GLAPIENTRY *glGetClipPlane) (GLenum plane, GLdouble *equation); 136 static void (GLAPIENTRY *glGetDoublev) ( GLenum pname, GLdouble *params ); 137 static void (GLAPIENTRY *glGetLightfv) (GLenum light, GLenum pname, GLfloat *params); 138 static void (GLAPIENTRY *glGetMaterialfv) (GLenum face, GLenum pname, GLfloat *params); 139 static void (GLAPIENTRY *glGetPointerv) (GLenum pname, GLvoid* *params); 140 static void (GLAPIENTRY *glGetTexEnvfv) (GLenum target, GLenum pname, GLfloat *params); 141 static void (GLAPIENTRY *glGetTexEnviv) (GLenum target, GLenum pname, GLint *params); 142 static void (GLAPIENTRY *glLightf) (GLenum light, GLenum pname, GLfloat param); 143 static void (GLAPIENTRY *glLightfv) (GLenum light, GLenum pname, const GLfloat *params); 144 static void (GLAPIENTRY *glLightModelf) (GLenum pname, GLfloat param); 145 static void (GLAPIENTRY *glLightModelfv) (GLenum pname, const GLfloat *params); 146 static void (GLAPIENTRY *glLoadIdentity) (void); 147 static void (GLAPIENTRY *glLoadMatrixf) (const GLfloat *m); 148 static void (GLAPIENTRY *glLogicOp) (GLenum opcode); 149 static void (GLAPIENTRY *glMaterialf) (GLenum face, GLenum pname, GLfloat param); 150 static void (GLAPIENTRY *glMaterialfv) (GLenum face, GLenum pname, const GLfloat *params); 151 static void (GLAPIENTRY *glMultiTexCoord2fv) ( GLenum target, const GLfloat *v ); 152 static void (GLAPIENTRY *glMultiTexCoord2sv) ( GLenum target, const GLshort *v ); 153 static void (GLAPIENTRY *glMultiTexCoord3fv) ( GLenum target, const GLfloat *v ); 154 static void (GLAPIENTRY *glMultiTexCoord3sv) ( GLenum target, const GLshort *v ); 155 static void (GLAPIENTRY *glMultiTexCoord4f) ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); 156 static void (GLAPIENTRY *glMultiTexCoord4fv) ( GLenum target, const GLfloat *v ); 157 static void (GLAPIENTRY *glMultiTexCoord4sv) ( GLenum target, const GLshort *v ); 158 static void (GLAPIENTRY *glMultMatrixf) (const GLfloat *m); 159 static void (GLAPIENTRY *glNormal3f) (GLfloat nx, GLfloat ny, GLfloat nz); 160 static void (GLAPIENTRY *glNormal3fv) ( const GLfloat *v ); 161 static void (GLAPIENTRY *glNormal3sv) ( const GLshort *v ); 162 static void (GLAPIENTRY *glOrtho) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); 163 static void (GLAPIENTRY *glPointParameterf) (GLenum, GLfloat); 164 static void (GLAPIENTRY *glPointParameterfv) (GLenum, const GLfloat *); 165 static void (GLAPIENTRY *glPointSize) (GLfloat size); 166 static void (GLAPIENTRY *glRotatef) (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); 167 static void (GLAPIENTRY *glScalef) (GLfloat x, GLfloat y, GLfloat z); 168 static void (GLAPIENTRY *glTexEnvf) (GLenum target, GLenum pname, GLfloat param); 169 static void (GLAPIENTRY *glTexEnvfv) (GLenum target, GLenum pname, const GLfloat *params); 170 static void (GLAPIENTRY *glTexParameterf) (GLenum target, GLenum pname, GLfloat param); 171 static void (GLAPIENTRY *glTexParameterfv) (GLenum target, GLenum pname, const GLfloat *params); 172 static void (GLAPIENTRY *glMatrixMode) (GLenum mode); 173 static void (GLAPIENTRY *glNormalPointer) (GLenum type, GLsizei stride, const GLvoid *pointer); 174 static void (GLAPIENTRY *glPopMatrix) (void); 175 static void (GLAPIENTRY *glPushMatrix) (void); 176 static void (GLAPIENTRY *glShadeModel) (GLenum mode); 177 static void (GLAPIENTRY *glTexCoordPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); 178 static void (GLAPIENTRY *glTexEnvi) (GLenum target, GLenum pname, GLint param); 179 static void (GLAPIENTRY *glTexEnviv) (GLenum target, GLenum pname, const GLint *params); 180 static void (GLAPIENTRY *glTranslatef) (GLfloat x, GLfloat y, GLfloat z); 181 static void (GLAPIENTRY *glVertexPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); 182 183 /* OpenGL functions which are needed ONLY for implementing GLES 1.1 EXTENSIONS*/ 184 static void (GLAPIENTRY *glCurrentPaletteMatrixARB) (GLint index); 185 static void (GLAPIENTRY *glMatrixIndexuivARB) (GLint size, GLuint * indices); 186 static void (GLAPIENTRY *glMatrixIndexPointerARB) (GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 187 static void (GLAPIENTRY *glWeightPointerARB) (GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 188 static void (GLAPIENTRY *glTexGenf) (GLenum coord, GLenum pname, GLfloat param ); 189 static void (GLAPIENTRY *glTexGeni) (GLenum coord, GLenum pname, GLint param ); 190 static void (GLAPIENTRY *glTexGenfv) (GLenum coord, GLenum pname, const GLfloat *params ); 191 static void (GLAPIENTRY *glTexGeniv) (GLenum coord, GLenum pname, const GLint *params ); 192 static void (GLAPIENTRY *glGetTexGenfv) (GLenum coord, GLenum pname, GLfloat *params ); 193 static void (GLAPIENTRY *glGetTexGeniv) (GLenum coord, GLenum pname, GLint *params ); 194 195 /* Loading OpenGL functions which are needed ONLY for implementing GLES 2.0*/ 196 static void (GL_APIENTRY *glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 197 static void (GL_APIENTRY *glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); 198 static void (GL_APIENTRY *glStencilMaskSeparate)(GLenum face, GLuint mask); 199 static GLboolean (GL_APIENTRY *glIsProgram)(GLuint program); 200 static GLboolean (GL_APIENTRY *glIsShader)(GLuint shader); 201 static void (GL_APIENTRY *glVertexAttrib1f)(GLuint indx, GLfloat x); 202 static void (GL_APIENTRY *glVertexAttrib1fv)(GLuint indx, const GLfloat* values); 203 static void (GL_APIENTRY *glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y); 204 static void (GL_APIENTRY *glVertexAttrib2fv)(GLuint indx, const GLfloat* values); 205 static void (GL_APIENTRY *glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z); 206 static void (GL_APIENTRY *glVertexAttrib3fv)(GLuint indx, const GLfloat* values); 207 static void (GL_APIENTRY *glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 208 static void (GL_APIENTRY *glVertexAttrib4fv)(GLuint indx, const GLfloat* values); 209 static void (GL_APIENTRY *glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); 210 static void (GL_APIENTRY *glDisableVertexAttribArray)(GLuint index); 211 static void (GL_APIENTRY *glEnableVertexAttribArray)(GLuint index); 212 static void (GL_APIENTRY *glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params); 213 static void (GL_APIENTRY *glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params); 214 static void (GL_APIENTRY *glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer); 215 static void (GL_APIENTRY *glUniform1f)(GLint location, GLfloat x); 216 static void (GL_APIENTRY *glUniform1fv)(GLint location, GLsizei count, const GLfloat* v); 217 static void (GL_APIENTRY *glUniform1i)(GLint location, GLint x); 218 static void (GL_APIENTRY *glUniform1iv)(GLint location, GLsizei count, const GLint* v); 219 static void (GL_APIENTRY *glUniform2f)(GLint location, GLfloat x, GLfloat y); 220 static void (GL_APIENTRY *glUniform2fv)(GLint location, GLsizei count, const GLfloat* v); 221 static void (GL_APIENTRY *glUniform2i)(GLint location, GLint x, GLint y); 222 static void (GL_APIENTRY *glUniform2iv)(GLint location, GLsizei count, const GLint* v); 223 static void (GL_APIENTRY *glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z); 224 static void (GL_APIENTRY *glUniform3fv)(GLint location, GLsizei count, const GLfloat* v); 225 static void (GL_APIENTRY *glUniform3i)(GLint location, GLint x, GLint y, GLint z); 226 static void (GL_APIENTRY *glUniform3iv)(GLint location, GLsizei count, const GLint* v); 227 static void (GL_APIENTRY *glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 228 static void (GL_APIENTRY *glUniform4fv)(GLint location, GLsizei count, const GLfloat* v); 229 static void (GL_APIENTRY *glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w); 230 static void (GL_APIENTRY *glUniform4iv)(GLint location, GLsizei count, const GLint* v); 231 static void (GL_APIENTRY *glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 232 static void (GL_APIENTRY *glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 233 static void (GL_APIENTRY *glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 234 static void (GL_APIENTRY *glAttachShader)(GLuint program, GLuint shader); 235 static void (GL_APIENTRY *glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name); 236 static void (GL_APIENTRY *glCompileShader)(GLuint shader); 237 static GLuint (GL_APIENTRY *glCreateProgram)(void); 238 static GLuint (GL_APIENTRY *glCreateShader)(GLenum type); 239 static void (GL_APIENTRY *glDeleteProgram)(GLuint program); 240 static void (GL_APIENTRY *glDeleteShader)(GLuint shader); 241 static void (GL_APIENTRY *glDetachShader)(GLuint program, GLuint shader); 242 static void (GL_APIENTRY *glLinkProgram)(GLuint program); 243 static void (GL_APIENTRY *glUseProgram)(GLuint program); 244 static void (GL_APIENTRY *glValidateProgram)(GLuint program); 245 static void (GL_APIENTRY *glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 246 static void (GL_APIENTRY *glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 247 static void (GL_APIENTRY *glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); 248 static int (GL_APIENTRY *glGetAttribLocation)(GLuint program, const GLchar* name); 249 static void (GL_APIENTRY *glGetProgramiv)(GLuint program, GLenum pname, GLint* params); 250 static void (GL_APIENTRY *glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); 251 static void (GL_APIENTRY *glGetShaderiv)(GLuint shader, GLenum pname, GLint* params); 252 static void (GL_APIENTRY *glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); 253 static void (GL_APIENTRY *glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 254 static void (GL_APIENTRY *glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); 255 static void (GL_APIENTRY *glGetUniformfv)(GLuint program, GLint location, GLfloat* params); 256 static void (GL_APIENTRY *glGetUniformiv)(GLuint program, GLint location, GLint* params); 257 static int (GL_APIENTRY *glGetUniformLocation)(GLuint program, const GLchar* name); 258 static void (GL_APIENTRY *glReleaseShaderCompiler)(void); 259 static void (GL_APIENTRY *glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); 260 static void (GL_APIENTRY *glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length); 261 262 private: 263 bool m_isLoaded; 264 static android::Mutex s_lock; 265 }; 266 267 #endif 268