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 static struct _gles_funcs_by_name {
17     const char *name;
18     void *proc;
19 } gles_funcs_by_name[] = {
20     {"glAlphaFunc", (void *)glAlphaFunc},
21     {"glClearColor", (void *)glClearColor},
22     {"glClearDepthf", (void *)glClearDepthf},
23     {"glClipPlanef", (void *)glClipPlanef},
24     {"glColor4f", (void *)glColor4f},
25     {"glDepthRangef", (void *)glDepthRangef},
26     {"glFogf", (void *)glFogf},
27     {"glFogfv", (void *)glFogfv},
28     {"glFrustumf", (void *)glFrustumf},
29     {"glGetClipPlanef", (void *)glGetClipPlanef},
30     {"glGetFloatv", (void *)glGetFloatv},
31     {"glGetLightfv", (void *)glGetLightfv},
32     {"glGetMaterialfv", (void *)glGetMaterialfv},
33     {"glGetTexEnvfv", (void *)glGetTexEnvfv},
34     {"glGetTexParameterfv", (void *)glGetTexParameterfv},
35     {"glLightModelf", (void *)glLightModelf},
36     {"glLightModelfv", (void *)glLightModelfv},
37     {"glLightf", (void *)glLightf},
38     {"glLightfv", (void *)glLightfv},
39     {"glLineWidth", (void *)glLineWidth},
40     {"glLoadMatrixf", (void *)glLoadMatrixf},
41     {"glMaterialf", (void *)glMaterialf},
42     {"glMaterialfv", (void *)glMaterialfv},
43     {"glMultMatrixf", (void *)glMultMatrixf},
44     {"glMultiTexCoord4f", (void *)glMultiTexCoord4f},
45     {"glNormal3f", (void *)glNormal3f},
46     {"glOrthof", (void *)glOrthof},
47     {"glPointParameterf", (void *)glPointParameterf},
48     {"glPointParameterfv", (void *)glPointParameterfv},
49     {"glPointSize", (void *)glPointSize},
50     {"glPolygonOffset", (void *)glPolygonOffset},
51     {"glRotatef", (void *)glRotatef},
52     {"glScalef", (void *)glScalef},
53     {"glTexEnvf", (void *)glTexEnvf},
54     {"glTexEnvfv", (void *)glTexEnvfv},
55     {"glTexParameterf", (void *)glTexParameterf},
56     {"glTexParameterfv", (void *)glTexParameterfv},
57     {"glTranslatef", (void *)glTranslatef},
58     {"glActiveTexture", (void *)glActiveTexture},
59     {"glAlphaFuncx", (void *)glAlphaFuncx},
60     {"glBindBuffer", (void *)glBindBuffer},
61     {"glBindTexture", (void *)glBindTexture},
62     {"glBlendFunc", (void *)glBlendFunc},
63     {"glBufferData", (void *)glBufferData},
64     {"glBufferSubData", (void *)glBufferSubData},
65     {"glClear", (void *)glClear},
66     {"glClearColorx", (void *)glClearColorx},
67     {"glClearDepthx", (void *)glClearDepthx},
68     {"glClearStencil", (void *)glClearStencil},
69     {"glClientActiveTexture", (void *)glClientActiveTexture},
70     {"glClipPlanex", (void *)glClipPlanex},
71     {"glColor4ub", (void *)glColor4ub},
72     {"glColor4x", (void *)glColor4x},
73     {"glColorMask", (void *)glColorMask},
74     {"glColorPointer", (void *)glColorPointer},
75     {"glCompressedTexImage2D", (void *)glCompressedTexImage2D},
76     {"glCompressedTexSubImage2D", (void *)glCompressedTexSubImage2D},
77     {"glCopyTexImage2D", (void *)glCopyTexImage2D},
78     {"glCopyTexSubImage2D", (void *)glCopyTexSubImage2D},
79     {"glCullFace", (void *)glCullFace},
80     {"glDeleteBuffers", (void *)glDeleteBuffers},
81     {"glDeleteTextures", (void *)glDeleteTextures},
82     {"glDepthFunc", (void *)glDepthFunc},
83     {"glDepthMask", (void *)glDepthMask},
84     {"glDepthRangex", (void *)glDepthRangex},
85     {"glDisable", (void *)glDisable},
86     {"glDisableClientState", (void *)glDisableClientState},
87     {"glDrawArrays", (void *)glDrawArrays},
88     {"glDrawElements", (void *)glDrawElements},
89     {"glEnable", (void *)glEnable},
90     {"glEnableClientState", (void *)glEnableClientState},
91     {"glFinish", (void *)glFinish},
92     {"glFlush", (void *)glFlush},
93     {"glFogx", (void *)glFogx},
94     {"glFogxv", (void *)glFogxv},
95     {"glFrontFace", (void *)glFrontFace},
96     {"glFrustumx", (void *)glFrustumx},
97     {"glGetBooleanv", (void *)glGetBooleanv},
98     {"glGetBufferParameteriv", (void *)glGetBufferParameteriv},
99     {"glGetClipPlanex", (void *)glGetClipPlanex},
100     {"glGenBuffers", (void *)glGenBuffers},
101     {"glGenTextures", (void *)glGenTextures},
102     {"glGetError", (void *)glGetError},
103     {"glGetFixedv", (void *)glGetFixedv},
104     {"glGetIntegerv", (void *)glGetIntegerv},
105     {"glGetLightxv", (void *)glGetLightxv},
106     {"glGetMaterialxv", (void *)glGetMaterialxv},
107     {"glGetPointerv", (void *)glGetPointerv},
108     {"glGetString", (void *)glGetString},
109     {"glGetTexEnviv", (void *)glGetTexEnviv},
110     {"glGetTexEnvxv", (void *)glGetTexEnvxv},
111     {"glGetTexParameteriv", (void *)glGetTexParameteriv},
112     {"glGetTexParameterxv", (void *)glGetTexParameterxv},
113     {"glHint", (void *)glHint},
114     {"glIsBuffer", (void *)glIsBuffer},
115     {"glIsEnabled", (void *)glIsEnabled},
116     {"glIsTexture", (void *)glIsTexture},
117     {"glLightModelx", (void *)glLightModelx},
118     {"glLightModelxv", (void *)glLightModelxv},
119     {"glLightx", (void *)glLightx},
120     {"glLightxv", (void *)glLightxv},
121     {"glLineWidthx", (void *)glLineWidthx},
122     {"glLoadIdentity", (void *)glLoadIdentity},
123     {"glLoadMatrixx", (void *)glLoadMatrixx},
124     {"glLogicOp", (void *)glLogicOp},
125     {"glMaterialx", (void *)glMaterialx},
126     {"glMaterialxv", (void *)glMaterialxv},
127     {"glMatrixMode", (void *)glMatrixMode},
128     {"glMultMatrixx", (void *)glMultMatrixx},
129     {"glMultiTexCoord4x", (void *)glMultiTexCoord4x},
130     {"glNormal3x", (void *)glNormal3x},
131     {"glNormalPointer", (void *)glNormalPointer},
132     {"glOrthox", (void *)glOrthox},
133     {"glPixelStorei", (void *)glPixelStorei},
134     {"glPointParameterx", (void *)glPointParameterx},
135     {"glPointParameterxv", (void *)glPointParameterxv},
136     {"glPointSizex", (void *)glPointSizex},
137     {"glPolygonOffsetx", (void *)glPolygonOffsetx},
138     {"glPopMatrix", (void *)glPopMatrix},
139     {"glPushMatrix", (void *)glPushMatrix},
140     {"glReadPixels", (void *)glReadPixels},
141     {"glRotatex", (void *)glRotatex},
142     {"glSampleCoverage", (void *)glSampleCoverage},
143     {"glSampleCoveragex", (void *)glSampleCoveragex},
144     {"glScalex", (void *)glScalex},
145     {"glScissor", (void *)glScissor},
146     {"glShadeModel", (void *)glShadeModel},
147     {"glStencilFunc", (void *)glStencilFunc},
148     {"glStencilMask", (void *)glStencilMask},
149     {"glStencilOp", (void *)glStencilOp},
150     {"glTexCoordPointer", (void *)glTexCoordPointer},
151     {"glTexEnvi", (void *)glTexEnvi},
152     {"glTexEnvx", (void *)glTexEnvx},
153     {"glTexEnviv", (void *)glTexEnviv},
154     {"glTexEnvxv", (void *)glTexEnvxv},
155     {"glTexImage2D", (void *)glTexImage2D},
156     {"glTexParameteri", (void *)glTexParameteri},
157     {"glTexParameterx", (void *)glTexParameterx},
158     {"glTexParameteriv", (void *)glTexParameteriv},
159     {"glTexParameterxv", (void *)glTexParameterxv},
160     {"glTexSubImage2D", (void *)glTexSubImage2D},
161     {"glTranslatex", (void *)glTranslatex},
162     {"glVertexPointer", (void *)glVertexPointer},
163     {"glViewport", (void *)glViewport},
164     {"glPointSizePointerOES", (void *)glPointSizePointerOES},
165     {"glBlendEquationSeparateOES", (void *)glBlendEquationSeparateOES},
166     {"glBlendFuncSeparateOES", (void *)glBlendFuncSeparateOES},
167     {"glBlendEquationOES", (void *)glBlendEquationOES},
168     {"glDrawTexsOES", (void *)glDrawTexsOES},
169     {"glDrawTexiOES", (void *)glDrawTexiOES},
170     {"glDrawTexxOES", (void *)glDrawTexxOES},
171     {"glDrawTexsvOES", (void *)glDrawTexsvOES},
172     {"glDrawTexivOES", (void *)glDrawTexivOES},
173     {"glDrawTexxvOES", (void *)glDrawTexxvOES},
174     {"glDrawTexfOES", (void *)glDrawTexfOES},
175     {"glDrawTexfvOES", (void *)glDrawTexfvOES},
176     {"glEGLImageTargetTexture2DOES", (void *)glEGLImageTargetTexture2DOES},
177     {"glEGLImageTargetRenderbufferStorageOES", (void *)glEGLImageTargetRenderbufferStorageOES},
178     {"glAlphaFuncxOES", (void *)glAlphaFuncxOES},
179     {"glClearColorxOES", (void *)glClearColorxOES},
180     {"glClearDepthxOES", (void *)glClearDepthxOES},
181     {"glClipPlanexOES", (void *)glClipPlanexOES},
182     {"glColor4xOES", (void *)glColor4xOES},
183     {"glDepthRangexOES", (void *)glDepthRangexOES},
184     {"glFogxOES", (void *)glFogxOES},
185     {"glFogxvOES", (void *)glFogxvOES},
186     {"glFrustumxOES", (void *)glFrustumxOES},
187     {"glGetClipPlanexOES", (void *)glGetClipPlanexOES},
188     {"glGetFixedvOES", (void *)glGetFixedvOES},
189     {"glGetLightxvOES", (void *)glGetLightxvOES},
190     {"glGetMaterialxvOES", (void *)glGetMaterialxvOES},
191     {"glGetTexEnvxvOES", (void *)glGetTexEnvxvOES},
192     {"glGetTexParameterxvOES", (void *)glGetTexParameterxvOES},
193     {"glLightModelxOES", (void *)glLightModelxOES},
194     {"glLightModelxvOES", (void *)glLightModelxvOES},
195     {"glLightxOES", (void *)glLightxOES},
196     {"glLightxvOES", (void *)glLightxvOES},
197     {"glLineWidthxOES", (void *)glLineWidthxOES},
198     {"glLoadMatrixxOES", (void *)glLoadMatrixxOES},
199     {"glMaterialxOES", (void *)glMaterialxOES},
200     {"glMaterialxvOES", (void *)glMaterialxvOES},
201     {"glMultMatrixxOES", (void *)glMultMatrixxOES},
202     {"glMultiTexCoord4xOES", (void *)glMultiTexCoord4xOES},
203     {"glNormal3xOES", (void *)glNormal3xOES},
204     {"glOrthoxOES", (void *)glOrthoxOES},
205     {"glPointParameterxOES", (void *)glPointParameterxOES},
206     {"glPointParameterxvOES", (void *)glPointParameterxvOES},
207     {"glPointSizexOES", (void *)glPointSizexOES},
208     {"glPolygonOffsetxOES", (void *)glPolygonOffsetxOES},
209     {"glRotatexOES", (void *)glRotatexOES},
210     {"glSampleCoveragexOES", (void *)glSampleCoveragexOES},
211     {"glScalexOES", (void *)glScalexOES},
212     {"glTexEnvxOES", (void *)glTexEnvxOES},
213     {"glTexEnvxvOES", (void *)glTexEnvxvOES},
214     {"glTexParameterxOES", (void *)glTexParameterxOES},
215     {"glTexParameterxvOES", (void *)glTexParameterxvOES},
216     {"glTranslatexOES", (void *)glTranslatexOES},
217     {"glIsRenderbufferOES", (void *)glIsRenderbufferOES},
218     {"glBindRenderbufferOES", (void *)glBindRenderbufferOES},
219     {"glDeleteRenderbuffersOES", (void *)glDeleteRenderbuffersOES},
220     {"glGenRenderbuffersOES", (void *)glGenRenderbuffersOES},
221     {"glRenderbufferStorageOES", (void *)glRenderbufferStorageOES},
222     {"glGetRenderbufferParameterivOES", (void *)glGetRenderbufferParameterivOES},
223     {"glIsFramebufferOES", (void *)glIsFramebufferOES},
224     {"glBindFramebufferOES", (void *)glBindFramebufferOES},
225     {"glDeleteFramebuffersOES", (void *)glDeleteFramebuffersOES},
226     {"glGenFramebuffersOES", (void *)glGenFramebuffersOES},
227     {"glCheckFramebufferStatusOES", (void *)glCheckFramebufferStatusOES},
228     {"glFramebufferRenderbufferOES", (void *)glFramebufferRenderbufferOES},
229     {"glFramebufferTexture2DOES", (void *)glFramebufferTexture2DOES},
230     {"glGetFramebufferAttachmentParameterivOES", (void *)glGetFramebufferAttachmentParameterivOES},
231     {"glGenerateMipmapOES", (void *)glGenerateMipmapOES},
232     {"glMapBufferOES", (void *)glMapBufferOES},
233     {"glUnmapBufferOES", (void *)glUnmapBufferOES},
234     {"glGetBufferPointervOES", (void *)glGetBufferPointervOES},
235     {"glCurrentPaletteMatrixOES", (void *)glCurrentPaletteMatrixOES},
236     {"glLoadPaletteFromModelViewMatrixOES", (void *)glLoadPaletteFromModelViewMatrixOES},
237     {"glMatrixIndexPointerOES", (void *)glMatrixIndexPointerOES},
238     {"glWeightPointerOES", (void *)glWeightPointerOES},
239     {"glQueryMatrixxOES", (void *)glQueryMatrixxOES},
240     {"glDepthRangefOES", (void *)glDepthRangefOES},
241     {"glFrustumfOES", (void *)glFrustumfOES},
242     {"glOrthofOES", (void *)glOrthofOES},
243     {"glClipPlanefOES", (void *)glClipPlanefOES},
244     {"glGetClipPlanefOES", (void *)glGetClipPlanefOES},
245     {"glClearDepthfOES", (void *)glClearDepthfOES},
246     {"glTexGenfOES", (void *)glTexGenfOES},
247     {"glTexGenfvOES", (void *)glTexGenfvOES},
248     {"glTexGeniOES", (void *)glTexGeniOES},
249     {"glTexGenivOES", (void *)glTexGenivOES},
250     {"glTexGenxOES", (void *)glTexGenxOES},
251     {"glTexGenxvOES", (void *)glTexGenxvOES},
252     {"glGetTexGenfvOES", (void *)glGetTexGenfvOES},
253     {"glGetTexGenivOES", (void *)glGetTexGenivOES},
254     {"glGetTexGenxvOES", (void *)glGetTexGenxvOES},
255     {"glBindVertexArrayOES", (void *)glBindVertexArrayOES},
256     {"glDeleteVertexArraysOES", (void *)glDeleteVertexArraysOES},
257     {"glGenVertexArraysOES", (void *)glGenVertexArraysOES},
258     {"glIsVertexArrayOES", (void *)glIsVertexArrayOES},
259     {"glDiscardFramebufferEXT", (void *)glDiscardFramebufferEXT},
260     {"glMultiDrawArraysEXT", (void *)glMultiDrawArraysEXT},
261     {"glMultiDrawElementsEXT", (void *)glMultiDrawElementsEXT},
262     {"glClipPlanefIMG", (void *)glClipPlanefIMG},
263     {"glClipPlanexIMG", (void *)glClipPlanexIMG},
264     {"glRenderbufferStorageMultisampleIMG", (void *)glRenderbufferStorageMultisampleIMG},
265     {"glFramebufferTexture2DMultisampleIMG", (void *)glFramebufferTexture2DMultisampleIMG},
266     {"glDeleteFencesNV", (void *)glDeleteFencesNV},
267     {"glGenFencesNV", (void *)glGenFencesNV},
268     {"glIsFenceNV", (void *)glIsFenceNV},
269     {"glTestFenceNV", (void *)glTestFenceNV},
270     {"glGetFenceivNV", (void *)glGetFenceivNV},
271     {"glFinishFenceNV", (void *)glFinishFenceNV},
272     {"glSetFenceNV", (void *)glSetFenceNV},
273     {"glGetDriverControlsQCOM", (void *)glGetDriverControlsQCOM},
274     {"glGetDriverControlStringQCOM", (void *)glGetDriverControlStringQCOM},
275     {"glEnableDriverControlQCOM", (void *)glEnableDriverControlQCOM},
276     {"glDisableDriverControlQCOM", (void *)glDisableDriverControlQCOM},
277     {"glExtGetTexturesQCOM", (void *)glExtGetTexturesQCOM},
278     {"glExtGetBuffersQCOM", (void *)glExtGetBuffersQCOM},
279     {"glExtGetRenderbuffersQCOM", (void *)glExtGetRenderbuffersQCOM},
280     {"glExtGetFramebuffersQCOM", (void *)glExtGetFramebuffersQCOM},
281     {"glExtGetTexLevelParameterivQCOM", (void *)glExtGetTexLevelParameterivQCOM},
282     {"glExtTexObjectStateOverrideiQCOM", (void *)glExtTexObjectStateOverrideiQCOM},
283     {"glExtGetTexSubImageQCOM", (void *)glExtGetTexSubImageQCOM},
284     {"glExtGetBufferPointervQCOM", (void *)glExtGetBufferPointervQCOM},
285     {"glExtGetShadersQCOM", (void *)glExtGetShadersQCOM},
286     {"glExtGetProgramsQCOM", (void *)glExtGetProgramsQCOM},
287     {"glExtIsProgramBinaryQCOM", (void *)glExtIsProgramBinaryQCOM},
288     {"glExtGetProgramBinarySourceQCOM", (void *)glExtGetProgramBinarySourceQCOM},
289     {"glStartTilingQCOM", (void *)glStartTilingQCOM},
290     {"glEndTilingQCOM", (void *)glEndTilingQCOM}
291 };
292 static int gles_num_funcs = sizeof(gles_funcs_by_name) / sizeof(struct _gles_funcs_by_name);
293