1 /* DO NOT EDIT *************************************************
2 * THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT
3 * API specification file: src/src/mesa/main/APIspec.xml
4 * GLES version: GLES1.1
5 * date: 2013-06-13 18:46:52
6 */
7
8
9 #include "GLES/gl.h"
10 #include "GLES/glext.h"
11 #include "main/mfeatures.h"
12 #include "main/compiler.h"
13 #include "main/api_exec.h"
14
15 #if FEATURE_ES1
16
17 #ifndef GLAPIENTRYP
18 #define GLAPIENTRYP GL_APIENTRYP
19 #endif
20
21 #include "main/es1_conversion.h"
22
23
24 /* These types are needed for the Mesa veneer, but are not defined in
25 * the standard GLES headers.
26 */
27 typedef double GLdouble;
28 typedef double GLclampd;
29
30 /* Mesa error handling requires these */
31 extern void *_mesa_get_current_context(void);
32 extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
33
34 /*************************************************************
35 * Generated functions begin here
36 */
37
38 extern void GL_APIENTRY _mesa_ActiveTextureARB(GLenum texture);
39 #define _es_ActiveTexture _mesa_ActiveTextureARB
40
41 extern void GL_APIENTRY _mesa_AlphaFunc(GLenum func, GLclampf ref);
42 #define _es_AlphaFunc _mesa_AlphaFunc
43
44 extern void GL_APIENTRY _mesa_BindBufferARB(GLenum target, GLuint buffer);
45 #define _es_BindBuffer _mesa_BindBufferARB
46
47 extern void GL_APIENTRY _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer);
48 #define _es_BindFramebufferOES _mesa_BindFramebufferEXT
49
50 extern void GL_APIENTRY _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer);
51 #define _es_BindRenderbufferOES _mesa_BindRenderbufferEXT
52
53 extern void GL_APIENTRY _mesa_BindTexture(GLenum target, GLuint texture);
54 #define _es_BindTexture _mesa_BindTexture
55
56 extern void GL_APIENTRY _mesa_BlendEquation(GLenum mode);
57 #define _es_BlendEquationOES _mesa_BlendEquation
58
59 extern void GL_APIENTRY _mesa_BlendEquationSeparateEXT(GLenum modeRGB, GLenum modeAlpha);
60 #define _es_BlendEquationSeparateOES _mesa_BlendEquationSeparateEXT
61
62 extern void GL_APIENTRY _mesa_BlendFunc(GLenum sfactor, GLenum dfactor);
63 #define _es_BlendFunc _mesa_BlendFunc
64
65 extern void GL_APIENTRY _mesa_BlendFuncSeparateEXT(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
66 #define _es_BlendFuncSeparateOES _mesa_BlendFuncSeparateEXT
67
68 extern void GL_APIENTRY _mesa_BufferDataARB(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
69 #define _es_BufferData _mesa_BufferDataARB
70
71 extern void GL_APIENTRY _mesa_BufferSubDataARB(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
72 #define _es_BufferSubData _mesa_BufferSubDataARB
73
74 extern GLenum GL_APIENTRY _mesa_CheckFramebufferStatusEXT(GLenum target);
75 #define _es_CheckFramebufferStatusOES _mesa_CheckFramebufferStatusEXT
76
77 extern void GL_APIENTRY _mesa_Clear(GLbitfield mask);
78 #define _es_Clear _mesa_Clear
79
80 extern void GL_APIENTRY _mesa_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
81 #define _es_ClearColor _mesa_ClearColor
82
83 extern void GL_APIENTRY _mesa_ClearDepthf(GLclampf depth);
84 #define _es_ClearDepthf _mesa_ClearDepthf
85
86 extern void GL_APIENTRY _mesa_ClearStencil(GLint s);
87 #define _es_ClearStencil _mesa_ClearStencil
88
89 extern void GL_APIENTRY _mesa_ClientActiveTextureARB(GLenum texture);
90 #define _es_ClientActiveTexture _mesa_ClientActiveTextureARB
91
92 /* this function is special and is defined elsewhere */
93 extern void GL_APIENTRY _es_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
94 #define _check_Color4f _es_Color4f
95
96 extern void GL_APIENTRY _mesa_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
97 #define _es_ColorMask _mesa_ColorMask
98
99 extern void GL_APIENTRY _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
100 #define _es_ColorPointer _mesa_ColorPointer
101
102 extern void GL_APIENTRY _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
103 #define _es_CompressedTexImage2D _mesa_CompressedTexImage2DARB
104
105 extern void GL_APIENTRY _mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data);
106 #define _es_CompressedTexSubImage2D _mesa_CompressedTexSubImage2DARB
107
108 extern void GL_APIENTRY _mesa_CopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
109 #define _es_CopyTexImage2D _mesa_CopyTexImage2D
110
111 extern void GL_APIENTRY _mesa_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
112 #define _es_CopyTexSubImage2D _mesa_CopyTexSubImage2D
113
114 extern void GL_APIENTRY _mesa_CullFace(GLenum mode);
115 #define _es_CullFace _mesa_CullFace
116
117 extern void GL_APIENTRY _mesa_DeleteBuffersARB(GLsizei n, const GLuint * buffer);
118 #define _es_DeleteBuffers _mesa_DeleteBuffersARB
119
120 extern void GL_APIENTRY _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
121 #define _es_DeleteFramebuffersOES _mesa_DeleteFramebuffersEXT
122
123 extern void GL_APIENTRY _mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
124 #define _es_DeleteRenderbuffersOES _mesa_DeleteRenderbuffersEXT
125
126 extern void GL_APIENTRY _mesa_DeleteTextures(GLsizei n, const GLuint * textures);
127 #define _es_DeleteTextures _mesa_DeleteTextures
128
129 extern void GL_APIENTRY _mesa_DepthFunc(GLenum func);
130 #define _es_DepthFunc _mesa_DepthFunc
131
132 extern void GL_APIENTRY _mesa_DepthMask(GLboolean flag);
133 #define _es_DepthMask _mesa_DepthMask
134
135 extern void GL_APIENTRY _mesa_DepthRangef(GLclampf zNear, GLclampf zFar);
136 #define _es_DepthRangef _mesa_DepthRangef
137
138 extern void GL_APIENTRY _mesa_Disable(GLenum cap);
139 #define _es_Disable _mesa_Disable
140
141 extern void GL_APIENTRY _mesa_DisableClientState(GLenum array);
142 #define _es_DisableClientState _mesa_DisableClientState
143
144 extern void GL_APIENTRY _mesa_DrawArrays(GLenum mode, GLint first, GLsizei count);
145 #define _es_DrawArrays _mesa_DrawArrays
146
147 extern void GL_APIENTRY _mesa_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices);
148 #define _es_DrawElements _mesa_DrawElements
149
150 extern void GL_APIENTRY _mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat h);
151 #define _es_DrawTexfOES _mesa_DrawTexf
152
153 extern void GL_APIENTRY _mesa_DrawTexfv(const GLfloat * coords);
154 #define _es_DrawTexfvOES _mesa_DrawTexfv
155
156 extern void GL_APIENTRY _mesa_DrawTexi(GLint x, GLint y, GLint z, GLint w, GLint h);
157 #define _es_DrawTexiOES _mesa_DrawTexi
158
159 extern void GL_APIENTRY _mesa_DrawTexiv(const GLint * coords);
160 #define _es_DrawTexivOES _mesa_DrawTexiv
161
162 extern void GL_APIENTRY _mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort w, GLshort h);
163 #define _es_DrawTexsOES _mesa_DrawTexs
164
165 extern void GL_APIENTRY _mesa_DrawTexsv(const GLshort * coords);
166 #define _es_DrawTexsvOES _mesa_DrawTexsv
167
168 extern void GL_APIENTRY _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
169 #define _es_EGLImageTargetRenderbufferStorageOES _mesa_EGLImageTargetRenderbufferStorageOES
170
171 extern void GL_APIENTRY _mesa_EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
172 #define _es_EGLImageTargetTexture2DOES _mesa_EGLImageTargetTexture2DOES
173
174 extern void GL_APIENTRY _mesa_Enable(GLenum cap);
175 #define _es_Enable _mesa_Enable
176
177 extern void GL_APIENTRY _mesa_EnableClientState(GLenum array);
178 #define _es_EnableClientState _mesa_EnableClientState
179
180 extern void GL_APIENTRY _mesa_Finish(void);
181 #define _es_Finish _mesa_Finish
182
183 extern void GL_APIENTRY _mesa_Flush(void);
184 #define _es_Flush _mesa_Flush
185
186 extern void GL_APIENTRY _mesa_Fogf(GLenum pname, GLfloat param);
187 #define _es_Fogf _mesa_Fogf
188
189 extern void GL_APIENTRY _mesa_Fogfv(GLenum pname, const GLfloat * params);
190 #define _es_Fogfv _mesa_Fogfv
191
192 extern void GL_APIENTRY _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
193 #define _es_FramebufferRenderbufferOES _mesa_FramebufferRenderbufferEXT
194
195 extern void GL_APIENTRY _mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
196 #define _es_FramebufferTexture2DOES _mesa_FramebufferTexture2DEXT
197
198 extern void GL_APIENTRY _mesa_FrontFace(GLenum mode);
199 #define _es_FrontFace _mesa_FrontFace
200
201 extern void GL_APIENTRY _mesa_GenBuffersARB(GLsizei n, GLuint * buffer);
202 #define _es_GenBuffers _mesa_GenBuffersARB
203
204 extern void GL_APIENTRY _mesa_GenFramebuffersEXT(GLsizei n, GLuint * ids);
205 #define _es_GenFramebuffersOES _mesa_GenFramebuffersEXT
206
207 extern void GL_APIENTRY _mesa_GenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
208 #define _es_GenRenderbuffersOES _mesa_GenRenderbuffersEXT
209
210 extern void GL_APIENTRY _mesa_GenTextures(GLsizei n, GLuint * textures);
211 #define _es_GenTextures _mesa_GenTextures
212
213 extern void GL_APIENTRY _mesa_GenerateMipmapEXT(GLenum target);
214 #define _es_GenerateMipmapOES _mesa_GenerateMipmapEXT
215
216 extern void GL_APIENTRY _mesa_GetBooleanv(GLenum pname, GLboolean * params);
217 #define _es_GetBooleanv _mesa_GetBooleanv
218
219 extern void GL_APIENTRY _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint * params);
220 #define _es_GetBufferParameteriv _mesa_GetBufferParameterivARB
221
222 extern void GL_APIENTRY _mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid ** params);
223 #define _es_GetBufferPointervOES _mesa_GetBufferPointervARB
224
225 extern GLenum GL_APIENTRY _mesa_GetError(void);
226 #define _es_GetError _mesa_GetError
227
228 extern void GL_APIENTRY _mesa_GetFixedv(GLenum pname, GLfixed * params);
229 #define _es_GetFixedv _mesa_GetFixedv
230
231 extern void GL_APIENTRY _mesa_GetFloatv(GLenum pname, GLfloat * params);
232 #define _es_GetFloatv _mesa_GetFloatv
233
234 extern void GL_APIENTRY _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
235 #define _es_GetFramebufferAttachmentParameterivOES _mesa_GetFramebufferAttachmentParameterivEXT
236
237 extern void GL_APIENTRY _mesa_GetIntegerv(GLenum pname, GLint * params);
238 #define _es_GetIntegerv _mesa_GetIntegerv
239
240 extern void GL_APIENTRY _mesa_GetLightfv(GLenum light, GLenum pname, GLfloat * params);
241 #define _es_GetLightfv _mesa_GetLightfv
242
243 extern void GL_APIENTRY _mesa_GetMaterialfv(GLenum face, GLenum pname, GLfloat * params);
244 #define _es_GetMaterialfv _mesa_GetMaterialfv
245
246 extern void GL_APIENTRY _mesa_GetPointerv(GLenum pname, GLvoid ** params);
247 #define _es_GetPointerv _mesa_GetPointerv
248
249 extern void GL_APIENTRY _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
250 #define _es_GetRenderbufferParameterivOES _mesa_GetRenderbufferParameterivEXT
251
252 extern const GLubyte * GL_APIENTRY _mesa_GetString(GLenum name);
253 #define _es_GetString _mesa_GetString
254
255 extern void GL_APIENTRY _mesa_GetTexEnvfv(GLenum target, GLenum pname, GLfloat * params);
256 #define _es_GetTexEnvfv _mesa_GetTexEnvfv
257
258 extern void GL_APIENTRY _mesa_GetTexEnviv(GLenum target, GLenum pname, GLint * params);
259 #define _es_GetTexEnviv _mesa_GetTexEnviv
260
261 /* this function is special and is defined elsewhere */
262 extern void GL_APIENTRY _es_GetTexGenfv(GLenum coord, GLenum pname, GLfloat * params);
263 #define _check_GetTexGenfvOES _es_GetTexGenfv
264
265 extern void GL_APIENTRY _mesa_GetTexParameterfv(GLenum target, GLenum pname, GLfloat * params);
266 #define _es_GetTexParameterfv _mesa_GetTexParameterfv
267
268 extern void GL_APIENTRY _mesa_GetTexParameteriv(GLenum target, GLenum pname, GLint * params);
269 #define _es_GetTexParameteriv _mesa_GetTexParameteriv
270
271 extern void GL_APIENTRY _mesa_Hint(GLenum target, GLenum mode);
272 #define _es_Hint _mesa_Hint
273
274 extern GLboolean GL_APIENTRY _mesa_IsBufferARB(GLuint buffer);
275 #define _es_IsBuffer _mesa_IsBufferARB
276
277 extern GLboolean GL_APIENTRY _mesa_IsEnabled(GLenum cap);
278 #define _es_IsEnabled _mesa_IsEnabled
279
280 extern GLboolean GL_APIENTRY _mesa_IsFramebufferEXT(GLuint framebuffer);
281 #define _es_IsFramebufferOES _mesa_IsFramebufferEXT
282
283 extern GLboolean GL_APIENTRY _mesa_IsRenderbufferEXT(GLuint renderbuffer);
284 #define _es_IsRenderbufferOES _mesa_IsRenderbufferEXT
285
286 extern GLboolean GL_APIENTRY _mesa_IsTexture(GLuint texture);
287 #define _es_IsTexture _mesa_IsTexture
288
289 extern void GL_APIENTRY _mesa_LightModelf(GLenum pname, GLfloat param);
290 #define _es_LightModelf _mesa_LightModelf
291
292 extern void GL_APIENTRY _mesa_LightModelfv(GLenum pname, const GLfloat * params);
293 #define _es_LightModelfv _mesa_LightModelfv
294
295 extern void GL_APIENTRY _mesa_Lightf(GLenum light, GLenum pname, GLfloat param);
296 #define _es_Lightf _mesa_Lightf
297
298 extern void GL_APIENTRY _mesa_Lightfv(GLenum light, GLenum pname, const GLfloat * params);
299 #define _es_Lightfv _mesa_Lightfv
300
301 extern void GL_APIENTRY _mesa_LineWidth(GLfloat width);
302 #define _es_LineWidth _mesa_LineWidth
303
304 extern void GL_APIENTRY _mesa_LoadIdentity(void);
305 #define _es_LoadIdentity _mesa_LoadIdentity
306
307 extern void GL_APIENTRY _mesa_LoadMatrixf(const GLfloat * m);
308 #define _es_LoadMatrixf _mesa_LoadMatrixf
309
310 extern void GL_APIENTRY _mesa_LogicOp(GLenum opcode);
311 #define _es_LogicOp _mesa_LogicOp
312
313 extern void * GL_APIENTRY _mesa_MapBufferARB(GLenum target, GLenum access);
314 #define _es_MapBufferOES _mesa_MapBufferARB
315
316 /* this function is special and is defined elsewhere */
317 extern void GL_APIENTRY _es_Materialf(GLenum face, GLenum pname, GLfloat param);
318 #define _check_Materialf _es_Materialf
319
320 /* this function is special and is defined elsewhere */
321 extern void GL_APIENTRY _es_Materialfv(GLenum face, GLenum pname, const GLfloat * params);
322 #define _check_Materialfv _es_Materialfv
323
324 extern void GL_APIENTRY _mesa_MatrixMode(GLenum mode);
325 #define _es_MatrixMode _mesa_MatrixMode
326
327 extern void GL_APIENTRY _mesa_MultMatrixf(const GLfloat * m);
328 #define _es_MultMatrixf _mesa_MultMatrixf
329
330 extern void GL_APIENTRY _mesa_MultiDrawArraysEXT(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount);
331 #define _es_MultiDrawArraysEXT _mesa_MultiDrawArraysEXT
332
333 extern void GL_APIENTRY _mesa_MultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount);
334 #define _es_MultiDrawElementsEXT _mesa_MultiDrawElementsEXT
335
336 /* this function is special and is defined elsewhere */
337 extern void GL_APIENTRY _es_MultiTexCoord4f(GLenum texture, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
338 #define _check_MultiTexCoord4f _es_MultiTexCoord4f
339
340 /* this function is special and is defined elsewhere */
341 extern void GL_APIENTRY _es_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz);
342 #define _check_Normal3f _es_Normal3f
343
344 extern void GL_APIENTRY _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid * pointer);
345 #define _es_NormalPointer _mesa_NormalPointer
346
347 extern void GL_APIENTRY _mesa_PixelStorei(GLenum pname, GLint param);
348 #define _es_PixelStorei _mesa_PixelStorei
349
350 extern void GL_APIENTRY _mesa_PointParameterf(GLenum pname, GLfloat param);
351 #define _es_PointParameterf _mesa_PointParameterf
352
353 extern void GL_APIENTRY _mesa_PointParameterfv(GLenum pname, const GLfloat * params);
354 #define _es_PointParameterfv _mesa_PointParameterfv
355
356 extern void GL_APIENTRY _mesa_PointSize(GLfloat size);
357 #define _es_PointSize _mesa_PointSize
358
359 extern void GL_APIENTRY _mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid * pointer);
360 #define _es_PointSizePointerOES _mesa_PointSizePointer
361
362 extern void GL_APIENTRY _mesa_PolygonOffset(GLfloat factor, GLfloat units);
363 #define _es_PolygonOffset _mesa_PolygonOffset
364
365 extern void GL_APIENTRY _mesa_PopMatrix(void);
366 #define _es_PopMatrix _mesa_PopMatrix
367
368 extern void GL_APIENTRY _mesa_PushMatrix(void);
369 #define _es_PushMatrix _mesa_PushMatrix
370
371 /* this function is special and is defined elsewhere */
372 extern GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed * mantissa, GLint * exponent);
373 #define _check_QueryMatrixxOES _es_QueryMatrixxOES
374
375 extern void GL_APIENTRY _mesa_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels);
376 #define _es_ReadPixels _mesa_ReadPixels
377
378 /* this function is special and is defined elsewhere */
379 extern void GL_APIENTRY _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height);
380 #define _check_RenderbufferStorageOES _es_RenderbufferStorageEXT
381
382 extern void GL_APIENTRY _mesa_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
383 #define _es_Rotatef _mesa_Rotatef
384
385 extern void GL_APIENTRY _mesa_SampleCoverageARB(GLclampf value, GLboolean invert);
386 #define _es_SampleCoverage _mesa_SampleCoverageARB
387
388 extern void GL_APIENTRY _mesa_Scalef(GLfloat x, GLfloat y, GLfloat z);
389 #define _es_Scalef _mesa_Scalef
390
391 extern void GL_APIENTRY _mesa_Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
392 #define _es_Scissor _mesa_Scissor
393
394 extern void GL_APIENTRY _mesa_ShadeModel(GLenum mode);
395 #define _es_ShadeModel _mesa_ShadeModel
396
397 extern void GL_APIENTRY _mesa_StencilFunc(GLenum func, GLint ref, GLuint mask);
398 #define _es_StencilFunc _mesa_StencilFunc
399
400 extern void GL_APIENTRY _mesa_StencilMask(GLuint mask);
401 #define _es_StencilMask _mesa_StencilMask
402
403 extern void GL_APIENTRY _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
404 #define _es_StencilOp _mesa_StencilOp
405
406 extern void GL_APIENTRY _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
407 #define _es_TexCoordPointer _mesa_TexCoordPointer
408
409 extern void GL_APIENTRY _mesa_TexEnvf(GLenum target, GLenum pname, GLfloat param);
410 #define _es_TexEnvf _mesa_TexEnvf
411
412 extern void GL_APIENTRY _mesa_TexEnvfv(GLenum target, GLenum pname, const GLfloat * params);
413 #define _es_TexEnvfv _mesa_TexEnvfv
414
415 extern void GL_APIENTRY _mesa_TexEnvi(GLenum target, GLenum pname, GLint param);
416 #define _es_TexEnvi _mesa_TexEnvi
417
418 extern void GL_APIENTRY _mesa_TexEnviv(GLenum target, GLenum pname, const GLint * params);
419 #define _es_TexEnviv _mesa_TexEnviv
420
421 /* this function is special and is defined elsewhere */
422 extern void GL_APIENTRY _es_TexGenf(GLenum coord, GLenum pname, GLfloat param);
423 #define _check_TexGenfOES _es_TexGenf
424
425 /* this function is special and is defined elsewhere */
426 extern void GL_APIENTRY _es_TexGenfv(GLenum coord, GLenum pname, const GLfloat * params);
427 #define _check_TexGenfvOES _es_TexGenfv
428
429 extern void GL_APIENTRY _mesa_TexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
430 #define _es_TexImage2D _mesa_TexImage2D
431
432 extern void GL_APIENTRY _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param);
433 #define _es_TexParameterf _mesa_TexParameterf
434
435 extern void GL_APIENTRY _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat * params);
436 #define _es_TexParameterfv _mesa_TexParameterfv
437
438 extern void GL_APIENTRY _mesa_TexParameteri(GLenum target, GLenum pname, GLint param);
439 #define _es_TexParameteri _mesa_TexParameteri
440
441 extern void GL_APIENTRY _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint * params);
442 #define _es_TexParameteriv _mesa_TexParameteriv
443
444 extern void GL_APIENTRY _mesa_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
445 #define _es_TexSubImage2D _mesa_TexSubImage2D
446
447 extern void GL_APIENTRY _mesa_Translatef(GLfloat x, GLfloat y, GLfloat z);
448 #define _es_Translatef _mesa_Translatef
449
450 extern GLboolean GL_APIENTRY _mesa_UnmapBufferARB(GLenum target);
451 #define _es_UnmapBufferOES _mesa_UnmapBufferARB
452
453 extern void GL_APIENTRY _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
454 #define _es_VertexPointer _mesa_VertexPointer
455
456 extern void GL_APIENTRY _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
457 #define _es_Viewport _mesa_Viewport
458
459
460 #include "glapi/glapi.h"
461
462 #if FEATURE_remap_table
463
464 /* define esLocalRemapTable */
465 #include "main/api_exec_es1_dispatch.h"
466
467 #define need_MESA_remap_table
468 #include "main/api_exec_es1_remap_helper.h"
469
470 static void
init_remap_table(void)471 init_remap_table(void)
472 {
473 _glthread_DECLARE_STATIC_MUTEX(mutex);
474 static GLboolean initialized = GL_FALSE;
475 const struct gl_function_pool_remap *remap = MESA_remap_table_functions;
476 int i;
477
478 _glthread_LOCK_MUTEX(mutex);
479 if (initialized) {
480 _glthread_UNLOCK_MUTEX(mutex);
481 return;
482 }
483
484 for (i = 0; i < esLocalRemapTable_size; i++) {
485 GLint offset;
486 const char *spec;
487
488 /* sanity check */
489 ASSERT(i == remap[i].remap_index);
490 spec = _mesa_function_pool + remap[i].pool_index;
491
492 offset = _mesa_map_function_spec(spec);
493 esLocalRemapTable[i] = offset;
494 }
495 initialized = GL_TRUE;
496 _glthread_UNLOCK_MUTEX(mutex);
497 }
498
499 #else /* FEATURE_remap_table */
500
501 #include "es1api/main/dispatch.h"
502
503 static INLINE void
init_remap_table(void)504 init_remap_table(void)
505 {
506 }
507
508 #endif /* FEATURE_remap_table */
509
510 struct _glapi_table *
_mesa_create_exec_table_es1(void)511 _mesa_create_exec_table_es1(void)
512 {
513 struct _glapi_table *exec;
514
515 exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
516 if (exec == NULL)
517 return NULL;
518
519 init_remap_table();
520
521 SET_ActiveTexture(exec, _es_ActiveTexture);
522 SET_AlphaFunc(exec, _es_AlphaFunc);
523 SET_AlphaFuncx(exec, _es_AlphaFuncx);
524 SET_BindBuffer(exec, _es_BindBuffer);
525 SET_BindFramebufferOES(exec, _es_BindFramebufferOES);
526 SET_BindRenderbufferOES(exec, _es_BindRenderbufferOES);
527 SET_BindTexture(exec, _es_BindTexture);
528 SET_BlendEquationOES(exec, _es_BlendEquationOES);
529 SET_BlendEquationSeparateOES(exec, _es_BlendEquationSeparateOES);
530 SET_BlendFunc(exec, _es_BlendFunc);
531 SET_BlendFuncSeparateOES(exec, _es_BlendFuncSeparateOES);
532 SET_BufferData(exec, _es_BufferData);
533 SET_BufferSubData(exec, _es_BufferSubData);
534 SET_CheckFramebufferStatusOES(exec, _es_CheckFramebufferStatusOES);
535 SET_Clear(exec, _es_Clear);
536 SET_ClearColor(exec, _es_ClearColor);
537 SET_ClearColorx(exec, _es_ClearColorx);
538 SET_ClearDepthf(exec, _es_ClearDepthf);
539 SET_ClearDepthx(exec, _es_ClearDepthx);
540 SET_ClearStencil(exec, _es_ClearStencil);
541 SET_ClientActiveTexture(exec, _es_ClientActiveTexture);
542 SET_ClipPlanef(exec, _es_ClipPlanef);
543 SET_ClipPlanex(exec, _es_ClipPlanex);
544 SET_Color4f(exec, _check_Color4f);
545 SET_Color4ub(exec, _es_Color4ub);
546 SET_Color4x(exec, _es_Color4x);
547 SET_ColorMask(exec, _es_ColorMask);
548 SET_ColorPointer(exec, _es_ColorPointer);
549 SET_CompressedTexImage2D(exec, _es_CompressedTexImage2D);
550 SET_CompressedTexSubImage2D(exec, _es_CompressedTexSubImage2D);
551 SET_CopyTexImage2D(exec, _es_CopyTexImage2D);
552 SET_CopyTexSubImage2D(exec, _es_CopyTexSubImage2D);
553 SET_CullFace(exec, _es_CullFace);
554 SET_DeleteBuffers(exec, _es_DeleteBuffers);
555 SET_DeleteFramebuffersOES(exec, _es_DeleteFramebuffersOES);
556 SET_DeleteRenderbuffersOES(exec, _es_DeleteRenderbuffersOES);
557 SET_DeleteTextures(exec, _es_DeleteTextures);
558 SET_DepthFunc(exec, _es_DepthFunc);
559 SET_DepthMask(exec, _es_DepthMask);
560 SET_DepthRangef(exec, _es_DepthRangef);
561 SET_DepthRangex(exec, _es_DepthRangex);
562 SET_Disable(exec, _es_Disable);
563 SET_DisableClientState(exec, _es_DisableClientState);
564 SET_DrawArrays(exec, _es_DrawArrays);
565 SET_DrawElements(exec, _es_DrawElements);
566 SET_DrawTexfOES(exec, _es_DrawTexfOES);
567 SET_DrawTexfvOES(exec, _es_DrawTexfvOES);
568 SET_DrawTexiOES(exec, _es_DrawTexiOES);
569 SET_DrawTexivOES(exec, _es_DrawTexivOES);
570 SET_DrawTexsOES(exec, _es_DrawTexsOES);
571 SET_DrawTexsvOES(exec, _es_DrawTexsvOES);
572 SET_DrawTexxOES(exec, _es_DrawTexxOES);
573 SET_DrawTexxvOES(exec, _es_DrawTexxvOES);
574 SET_EGLImageTargetRenderbufferStorageOES(exec, _es_EGLImageTargetRenderbufferStorageOES);
575 SET_EGLImageTargetTexture2DOES(exec, _es_EGLImageTargetTexture2DOES);
576 SET_Enable(exec, _es_Enable);
577 SET_EnableClientState(exec, _es_EnableClientState);
578 SET_Finish(exec, _es_Finish);
579 SET_Flush(exec, _es_Flush);
580 SET_Fogf(exec, _es_Fogf);
581 SET_Fogfv(exec, _es_Fogfv);
582 SET_Fogx(exec, _es_Fogx);
583 SET_Fogxv(exec, _es_Fogxv);
584 SET_FramebufferRenderbufferOES(exec, _es_FramebufferRenderbufferOES);
585 SET_FramebufferTexture2DOES(exec, _es_FramebufferTexture2DOES);
586 SET_FrontFace(exec, _es_FrontFace);
587 SET_Frustumf(exec, _es_Frustumf);
588 SET_Frustumx(exec, _es_Frustumx);
589 SET_GenBuffers(exec, _es_GenBuffers);
590 SET_GenFramebuffersOES(exec, _es_GenFramebuffersOES);
591 SET_GenRenderbuffersOES(exec, _es_GenRenderbuffersOES);
592 SET_GenTextures(exec, _es_GenTextures);
593 SET_GenerateMipmapOES(exec, _es_GenerateMipmapOES);
594 SET_GetBooleanv(exec, _es_GetBooleanv);
595 SET_GetBufferParameteriv(exec, _es_GetBufferParameteriv);
596 SET_GetBufferPointervOES(exec, _es_GetBufferPointervOES);
597 SET_GetClipPlanef(exec, _es_GetClipPlanef);
598 SET_GetClipPlanex(exec, _es_GetClipPlanex);
599 SET_GetError(exec, _es_GetError);
600 SET_GetFixedv(exec, _es_GetFixedv);
601 SET_GetFloatv(exec, _es_GetFloatv);
602 SET_GetFramebufferAttachmentParameterivOES(exec, _es_GetFramebufferAttachmentParameterivOES);
603 SET_GetIntegerv(exec, _es_GetIntegerv);
604 SET_GetLightfv(exec, _es_GetLightfv);
605 SET_GetLightxv(exec, _es_GetLightxv);
606 SET_GetMaterialfv(exec, _es_GetMaterialfv);
607 SET_GetMaterialxv(exec, _es_GetMaterialxv);
608 SET_GetPointerv(exec, _es_GetPointerv);
609 SET_GetRenderbufferParameterivOES(exec, _es_GetRenderbufferParameterivOES);
610 SET_GetString(exec, _es_GetString);
611 SET_GetTexEnvfv(exec, _es_GetTexEnvfv);
612 SET_GetTexEnviv(exec, _es_GetTexEnviv);
613 SET_GetTexEnvxv(exec, _es_GetTexEnvxv);
614 SET_GetTexGenfvOES(exec, _check_GetTexGenfvOES);
615 SET_GetTexGenivOES(exec, _check_GetTexGenivOES);
616 SET_GetTexGenxvOES(exec, _check_GetTexGenxvOES);
617 SET_GetTexParameterfv(exec, _es_GetTexParameterfv);
618 SET_GetTexParameteriv(exec, _es_GetTexParameteriv);
619 SET_GetTexParameterxv(exec, _es_GetTexParameterxv);
620 SET_Hint(exec, _es_Hint);
621 SET_IsBuffer(exec, _es_IsBuffer);
622 SET_IsEnabled(exec, _es_IsEnabled);
623 SET_IsFramebufferOES(exec, _es_IsFramebufferOES);
624 SET_IsRenderbufferOES(exec, _es_IsRenderbufferOES);
625 SET_IsTexture(exec, _es_IsTexture);
626 SET_LightModelf(exec, _es_LightModelf);
627 SET_LightModelfv(exec, _es_LightModelfv);
628 SET_LightModelx(exec, _es_LightModelx);
629 SET_LightModelxv(exec, _es_LightModelxv);
630 SET_Lightf(exec, _es_Lightf);
631 SET_Lightfv(exec, _es_Lightfv);
632 SET_Lightx(exec, _es_Lightx);
633 SET_Lightxv(exec, _es_Lightxv);
634 SET_LineWidth(exec, _es_LineWidth);
635 SET_LineWidthx(exec, _es_LineWidthx);
636 SET_LoadIdentity(exec, _es_LoadIdentity);
637 SET_LoadMatrixf(exec, _es_LoadMatrixf);
638 SET_LoadMatrixx(exec, _es_LoadMatrixx);
639 SET_LogicOp(exec, _es_LogicOp);
640 SET_MapBufferOES(exec, _es_MapBufferOES);
641 SET_Materialf(exec, _check_Materialf);
642 SET_Materialfv(exec, _check_Materialfv);
643 SET_Materialx(exec, _es_Materialx);
644 SET_Materialxv(exec, _es_Materialxv);
645 SET_MatrixMode(exec, _es_MatrixMode);
646 SET_MultMatrixf(exec, _es_MultMatrixf);
647 SET_MultMatrixx(exec, _es_MultMatrixx);
648 SET_MultiDrawArraysEXT(exec, _es_MultiDrawArraysEXT);
649 SET_MultiDrawElementsEXT(exec, _es_MultiDrawElementsEXT);
650 SET_MultiTexCoord4f(exec, _check_MultiTexCoord4f);
651 SET_MultiTexCoord4x(exec, _es_MultiTexCoord4x);
652 SET_Normal3f(exec, _check_Normal3f);
653 SET_Normal3x(exec, _es_Normal3x);
654 SET_NormalPointer(exec, _es_NormalPointer);
655 SET_Orthof(exec, _es_Orthof);
656 SET_Orthox(exec, _es_Orthox);
657 SET_PixelStorei(exec, _es_PixelStorei);
658 SET_PointParameterf(exec, _es_PointParameterf);
659 SET_PointParameterfv(exec, _es_PointParameterfv);
660 SET_PointParameterx(exec, _es_PointParameterx);
661 SET_PointParameterxv(exec, _es_PointParameterxv);
662 SET_PointSize(exec, _es_PointSize);
663 SET_PointSizePointerOES(exec, _es_PointSizePointerOES);
664 SET_PointSizex(exec, _es_PointSizex);
665 SET_PolygonOffset(exec, _es_PolygonOffset);
666 SET_PolygonOffsetx(exec, _es_PolygonOffsetx);
667 SET_PopMatrix(exec, _es_PopMatrix);
668 SET_PushMatrix(exec, _es_PushMatrix);
669 SET_QueryMatrixxOES(exec, _check_QueryMatrixxOES);
670 SET_ReadPixels(exec, _es_ReadPixels);
671 SET_RenderbufferStorageOES(exec, _check_RenderbufferStorageOES);
672 SET_Rotatef(exec, _es_Rotatef);
673 SET_Rotatex(exec, _es_Rotatex);
674 SET_SampleCoverage(exec, _es_SampleCoverage);
675 SET_SampleCoveragex(exec, _es_SampleCoveragex);
676 SET_Scalef(exec, _es_Scalef);
677 SET_Scalex(exec, _es_Scalex);
678 SET_Scissor(exec, _es_Scissor);
679 SET_ShadeModel(exec, _es_ShadeModel);
680 SET_StencilFunc(exec, _es_StencilFunc);
681 SET_StencilMask(exec, _es_StencilMask);
682 SET_StencilOp(exec, _es_StencilOp);
683 SET_TexCoordPointer(exec, _es_TexCoordPointer);
684 SET_TexEnvf(exec, _es_TexEnvf);
685 SET_TexEnvfv(exec, _es_TexEnvfv);
686 SET_TexEnvi(exec, _es_TexEnvi);
687 SET_TexEnviv(exec, _es_TexEnviv);
688 SET_TexEnvx(exec, _es_TexEnvx);
689 SET_TexEnvxv(exec, _es_TexEnvxv);
690 SET_TexGenfOES(exec, _check_TexGenfOES);
691 SET_TexGenfvOES(exec, _check_TexGenfvOES);
692 SET_TexGeniOES(exec, _check_TexGeniOES);
693 SET_TexGenivOES(exec, _check_TexGenivOES);
694 SET_TexGenxOES(exec, _check_TexGenxOES);
695 SET_TexGenxvOES(exec, _check_TexGenxvOES);
696 SET_TexImage2D(exec, _es_TexImage2D);
697 SET_TexParameterf(exec, _es_TexParameterf);
698 SET_TexParameterfv(exec, _es_TexParameterfv);
699 SET_TexParameteri(exec, _es_TexParameteri);
700 SET_TexParameteriv(exec, _es_TexParameteriv);
701 SET_TexParameterx(exec, _es_TexParameterx);
702 SET_TexParameterxv(exec, _es_TexParameterxv);
703 SET_TexSubImage2D(exec, _es_TexSubImage2D);
704 SET_Translatef(exec, _es_Translatef);
705 SET_Translatex(exec, _es_Translatex);
706 SET_UnmapBufferOES(exec, _es_UnmapBufferOES);
707 SET_VertexPointer(exec, _es_VertexPointer);
708 SET_Viewport(exec, _es_Viewport);
709
710 return exec;
711 }
712
713 #endif /* FEATURE_ES1 */
714