1 // Copyright 2016 The SwiftShader Authors. All Rights Reserved.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 // main.cpp: DLL entry point and management of thread-local data.
19 #include "libGLES_CM.hpp"
20 #include "Framebuffer.h"
21 #include "libEGL/EGLSurface.h"
22 #include "Common/Thread.hpp"
23 #include "Common/SharedLibrary.hpp"
24 #include "common/debug.h"
26 #include <GLES/glext.h>
28 #if !defined(_MSC_VER)
29 #define CONSTRUCTOR __attribute__((constructor))
30 #define DESTRUCTOR __attribute__((destructor))
36 static void glAttachThread()
41 static void glDetachThread()
46 CONSTRUCTOR static void glAttachProcess()
53 DESTRUCTOR static void glDetachProcess()
61 extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
65 case DLL_PROCESS_ATTACH:
68 case DLL_THREAD_ATTACH:
71 case DLL_THREAD_DETACH:
74 case DLL_PROCESS_DETACH:
87 es1::Context *getContext()
89 egl::Context *context = libEGL->clientGetCurrentContext();
91 if(context && context->getClientVersion() == 1)
93 return static_cast<es1::Context*>(context);
101 Context *context = getContext();
103 return context ? context->getDevice() : 0;
106 // Records an error code
107 void error(GLenum errorCode)
109 es1::Context *context = es1::getContext();
115 case GL_INVALID_ENUM:
116 context->recordInvalidEnum();
117 TRACE("\t! Error generated: invalid enum\n");
119 case GL_INVALID_VALUE:
120 context->recordInvalidValue();
121 TRACE("\t! Error generated: invalid value\n");
123 case GL_INVALID_OPERATION:
124 context->recordInvalidOperation();
125 TRACE("\t! Error generated: invalid operation\n");
127 case GL_OUT_OF_MEMORY:
128 context->recordOutOfMemory();
129 TRACE("\t! Error generated: out of memory\n");
131 case GL_INVALID_FRAMEBUFFER_OPERATION_OES:
132 context->recordInvalidFramebufferOperation();
133 TRACE("\t! Error generated: invalid framebuffer operation\n");
135 case GL_STACK_OVERFLOW:
136 context->recordMatrixStackOverflow();
137 TRACE("\t! Error generated: matrix stack overflow\n");
139 case GL_STACK_UNDERFLOW:
140 context->recordMatrixStackUnderflow();
141 TRACE("\t! Error generated: matrix stack underflow\n");
143 default: UNREACHABLE(errorCode);
151 void ActiveTexture(GLenum texture);
152 void AlphaFunc(GLenum func, GLclampf ref);
153 void AlphaFuncx(GLenum func, GLclampx ref);
154 void BindBuffer(GLenum target, GLuint buffer);
155 void BindFramebuffer(GLenum target, GLuint framebuffer);
156 void BindFramebufferOES(GLenum target, GLuint framebuffer);
157 void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
158 void BindTexture(GLenum target, GLuint texture);
159 void BlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
160 void BlendEquationOES(GLenum mode);
161 void BlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
162 void BlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
163 void BlendFunc(GLenum sfactor, GLenum dfactor);
164 void BlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
165 void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
166 void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
167 GLenum CheckFramebufferStatusOES(GLenum target);
168 void Clear(GLbitfield mask);
169 void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
170 void ClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
171 void ClearDepthf(GLclampf depth);
172 void ClearDepthx(GLclampx depth);
173 void ClearStencil(GLint s);
174 void ClientActiveTexture(GLenum texture);
175 void ClipPlanef(GLenum plane, const GLfloat *equation);
176 void ClipPlanex(GLenum plane, const GLfixed *equation);
177 void Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
178 void Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
179 void Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
180 void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
181 void ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
182 void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
183 GLint border, GLsizei imageSize, const GLvoid* data);
184 void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
185 GLenum format, GLsizei imageSize, const GLvoid* data);
186 void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
187 void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
188 void CullFace(GLenum mode);
189 void DeleteBuffers(GLsizei n, const GLuint* buffers);
190 void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
191 void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
192 void DeleteTextures(GLsizei n, const GLuint* textures);
193 void DepthFunc(GLenum func);
194 void DepthMask(GLboolean flag);
195 void DepthRangex(GLclampx zNear, GLclampx zFar);
196 void DepthRangef(GLclampf zNear, GLclampf zFar);
197 void Disable(GLenum cap);
198 void DisableClientState(GLenum array);
199 void DrawArrays(GLenum mode, GLint first, GLsizei count);
200 void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
201 void Enable(GLenum cap);
202 void EnableClientState(GLenum array);
205 void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
206 void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
207 void Fogf(GLenum pname, GLfloat param);
208 void Fogfv(GLenum pname, const GLfloat *params);
209 void Fogx(GLenum pname, GLfixed param);
210 void Fogxv(GLenum pname, const GLfixed *params);
211 void FrontFace(GLenum mode);
212 void Frustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
213 void Frustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
214 void GenerateMipmapOES(GLenum target);
215 void GenBuffers(GLsizei n, GLuint* buffers);
216 void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
217 void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
218 void GenTextures(GLsizei n, GLuint* textures);
219 void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
220 void GetBooleanv(GLenum pname, GLboolean* params);
221 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
222 void GetClipPlanef(GLenum pname, GLfloat eqn[4]);
223 void GetClipPlanex(GLenum pname, GLfixed eqn[4]);
224 GLenum GetError(void);
225 void GetFixedv(GLenum pname, GLfixed *params);
226 void GetFloatv(GLenum pname, GLfloat* params);
227 void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
228 void GetIntegerv(GLenum pname, GLint* params);
229 void GetLightfv(GLenum light, GLenum pname, GLfloat *params);
230 void GetLightxv(GLenum light, GLenum pname, GLfixed *params);
231 void GetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
232 void GetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
233 void GetPointerv(GLenum pname, GLvoid **params);
234 const GLubyte* GetString(GLenum name);
235 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
236 void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
237 void GetTexEnvfv(GLenum env, GLenum pname, GLfloat *params);
238 void GetTexEnviv(GLenum env, GLenum pname, GLint *params);
239 void GetTexEnvxv(GLenum env, GLenum pname, GLfixed *params);
240 void GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
241 void Hint(GLenum target, GLenum mode);
242 GLboolean IsBuffer(GLuint buffer);
243 GLboolean IsEnabled(GLenum cap);
244 GLboolean IsFramebufferOES(GLuint framebuffer);
245 GLboolean IsTexture(GLuint texture);
246 GLboolean IsRenderbufferOES(GLuint renderbuffer);
247 void LightModelf(GLenum pname, GLfloat param);
248 void LightModelfv(GLenum pname, const GLfloat *params);
249 void LightModelx(GLenum pname, GLfixed param);
250 void LightModelxv(GLenum pname, const GLfixed *params);
251 void Lightf(GLenum light, GLenum pname, GLfloat param);
252 void Lightfv(GLenum light, GLenum pname, const GLfloat *params);
253 void Lightx(GLenum light, GLenum pname, GLfixed param);
254 void Lightxv(GLenum light, GLenum pname, const GLfixed *params);
255 void LineWidth(GLfloat width);
256 void LineWidthx(GLfixed width);
257 void LoadIdentity(void);
258 void LoadMatrixf(const GLfloat *m);
259 void LoadMatrixx(const GLfixed *m);
260 void LogicOp(GLenum opcode);
261 void Materialf(GLenum face, GLenum pname, GLfloat param);
262 void Materialfv(GLenum face, GLenum pname, const GLfloat *params);
263 void Materialx(GLenum face, GLenum pname, GLfixed param);
264 void Materialxv(GLenum face, GLenum pname, const GLfixed *params);
265 void MatrixMode(GLenum mode);
266 void MultMatrixf(const GLfloat *m);
267 void MultMatrixx(const GLfixed *m);
268 void MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
269 void MultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
270 void Normal3f(GLfloat nx, GLfloat ny, GLfloat nz);
271 void Normal3x(GLfixed nx, GLfixed ny, GLfixed nz);
272 void NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
273 void Orthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
274 void Orthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
275 void PixelStorei(GLenum pname, GLint param);
276 void PointParameterf(GLenum pname, GLfloat param);
277 void PointParameterfv(GLenum pname, const GLfloat *params);
278 void PointParameterx(GLenum pname, GLfixed param);
279 void PointParameterxv(GLenum pname, const GLfixed *params);
280 void PointSize(GLfloat size);
281 void PointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
282 void PointSizex(GLfixed size);
283 void PolygonOffset(GLfloat factor, GLfloat units);
284 void PolygonOffsetx(GLfixed factor, GLfixed units);
285 void PopMatrix(void);
286 void PushMatrix(void);
287 void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
288 void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
289 void Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
290 void Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
291 void SampleCoverage(GLclampf value, GLboolean invert);
292 void SampleCoveragex(GLclampx value, GLboolean invert);
293 void Scalef(GLfloat x, GLfloat y, GLfloat z);
294 void Scalex(GLfixed x, GLfixed y, GLfixed z);
295 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
296 void ShadeModel(GLenum mode);
297 void StencilFunc(GLenum func, GLint ref, GLuint mask);
298 void StencilMask(GLuint mask);
299 void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
300 void TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
301 void TexEnvf(GLenum target, GLenum pname, GLfloat param);
302 void TexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
303 void TexEnvi(GLenum target, GLenum pname, GLint param);
304 void TexEnvx(GLenum target, GLenum pname, GLfixed param);
305 void TexEnviv(GLenum target, GLenum pname, const GLint *params);
306 void TexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
307 void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
308 GLint border, GLenum format, GLenum type, const GLvoid* pixels);
309 void TexParameterf(GLenum target, GLenum pname, GLfloat param);
310 void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
311 void TexParameteri(GLenum target, GLenum pname, GLint param);
312 void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
313 void TexParameterx(GLenum target, GLenum pname, GLfixed param);
314 void TexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
315 void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
316 GLenum format, GLenum type, const GLvoid* pixels);
317 void Translatef(GLfloat x, GLfloat y, GLfloat z);
318 void Translatex(GLfixed x, GLfixed y, GLfixed z);
319 void VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
320 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
321 void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
322 void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
323 void DrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
324 void DrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
325 void DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
326 void DrawTexsvOES(const GLshort *coords);
327 void DrawTexivOES(const GLint *coords);
328 void DrawTexxvOES(const GLfixed *coords);
329 void DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
330 void DrawTexfvOES(const GLfloat *coords);
333 egl::Context *es1CreateContext(egl::Display *display, const egl::Context *shareContext);
334 extern "C" __eglMustCastToProperFunctionPointerType es1GetProcAddress(const char *procname);
335 egl::Image *createBackBuffer(int width, int height, const egl::Config *config);
336 egl::Image *createDepthStencil(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard);
337 sw::FrameBuffer *createFrameBuffer(void *nativeDisplay, EGLNativeWindowType window, int width, int height);
341 EGLAPI EGLint EGLAPIENTRY eglGetError(void)
343 return libEGL->eglGetError();
346 EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
348 return libEGL->eglGetDisplay(display_id);
351 EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
353 return libEGL->eglInitialize(dpy, major, minor);
356 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
358 return libEGL->eglTerminate(dpy);
361 EGLAPI const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
363 return libEGL->eglQueryString(dpy, name);
366 EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
368 return libEGL->eglGetConfigs(dpy, configs, config_size, num_config);
371 EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
373 return libEGL->eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
376 EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
378 return libEGL->eglGetConfigAttrib(dpy, config, attribute, value);
381 EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType window, const EGLint *attrib_list)
383 return libEGL->eglCreateWindowSurface(dpy, config, window, attrib_list);
386 EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
388 return libEGL->eglCreatePbufferSurface(dpy, config, attrib_list);
391 EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)
393 return libEGL->eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
396 EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
398 return libEGL->eglDestroySurface(dpy, surface);
401 EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
403 return libEGL->eglQuerySurface(dpy, surface, attribute, value);
406 EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
408 return libEGL->eglBindAPI(api);
411 EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void)
413 return libEGL->eglQueryAPI();
416 EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void)
418 return libEGL->eglWaitClient();
421 EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void)
423 return libEGL->eglReleaseThread();
426 EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
428 return libEGL->eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
431 EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
433 return libEGL->eglSurfaceAttrib(dpy, surface, attribute, value);
436 EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
438 return libEGL->eglBindTexImage(dpy, surface, buffer);
441 EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
443 return libEGL->eglReleaseTexImage(dpy, surface, buffer);
446 EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
448 return libEGL->eglSwapInterval(dpy, interval);
451 EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
453 return libEGL->eglCreateContext(dpy, config, share_context, attrib_list);
456 EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
458 return libEGL->eglDestroyContext(dpy, ctx);
461 EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
463 return libEGL->eglMakeCurrent(dpy, draw, read, ctx);
466 EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void)
468 return libEGL->eglGetCurrentContext();
471 EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw)
473 return libEGL->eglGetCurrentSurface(readdraw);
476 EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void)
478 return libEGL->eglGetCurrentDisplay();
481 EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
483 return libEGL->eglQueryContext(dpy, ctx, attribute, value);
486 EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void)
488 return libEGL->eglWaitGL();
491 EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
493 return libEGL->eglWaitNative(engine);
496 EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
498 return libEGL->eglSwapBuffers(dpy, surface);
501 EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
503 return libEGL->eglCopyBuffers(dpy, surface, target);
506 EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
508 return libEGL->eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
511 EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
513 return libEGL->eglDestroyImageKHR(dpy, image);
516 EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
518 return libEGL->eglGetProcAddress(procname);
521 EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
523 return libEGL->eglCreateSyncKHR(dpy, type, attrib_list);
526 EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
528 return libEGL->eglDestroySyncKHR(dpy, sync);
531 EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
533 return libEGL->eglClientWaitSyncKHR(dpy, sync, flags, timeout);
536 EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
538 return libEGL->eglGetSyncAttribKHR(dpy, sync, attribute, value);
541 GL_API void GL_APIENTRY glActiveTexture(GLenum texture)
543 return es1::ActiveTexture(texture);
546 GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref)
548 return es1::AlphaFunc(func, ref);
551 GL_API void GL_APIENTRY glAlphaFuncx(GLenum func, GLclampx ref)
553 return es1::AlphaFuncx(func, ref);
556 GL_API void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
558 return es1::BindBuffer(target, buffer);
561 GL_API void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
563 return es1::BindFramebuffer(target, framebuffer);
566 GL_API void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
568 return es1::BindFramebufferOES(target, framebuffer);
571 GL_API void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
573 return es1::BindRenderbufferOES(target, renderbuffer);
576 GL_API void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
578 return es1::BindTexture(target, texture);
581 GL_API void GL_APIENTRY glBlendEquationOES(GLenum mode)
583 return es1::BlendEquationSeparateOES(mode, mode);
586 GL_API void GL_APIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha)
588 return es1::BlendEquationSeparateOES(modeRGB, modeAlpha);
591 GL_API void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
593 return es1::BlendFuncSeparateOES(sfactor, dfactor, sfactor, dfactor);
596 GL_API void GL_APIENTRY glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
598 return es1::BlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
601 GL_API void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
603 return es1::BufferData(target, size, data, usage);
606 GL_API void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
608 return es1::BufferSubData(target, offset, size, data);
611 GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
613 return es1::CheckFramebufferStatusOES(target);
616 GL_API void GL_APIENTRY glClear(GLbitfield mask)
618 return es1::Clear(mask);
621 GL_API void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
623 return es1::ClearColor(red, green, blue, alpha);
626 GL_API void GL_APIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
628 return es1::ClearColorx(red, green, blue, alpha);
631 GL_API void GL_APIENTRY glClearDepthf(GLclampf depth)
633 return es1::ClearDepthf(depth);
636 GL_API void GL_APIENTRY glClearDepthx(GLclampx depth)
638 return es1::ClearDepthx(depth);
641 GL_API void GL_APIENTRY glClearStencil(GLint s)
643 return es1::ClearStencil(s);
646 GL_API void GL_APIENTRY glClientActiveTexture(GLenum texture)
648 return es1::ClientActiveTexture(texture);
651 GL_API void GL_APIENTRY glClipPlanef(GLenum plane, const GLfloat *equation)
653 return es1::ClipPlanef(plane, equation);
656 GL_API void GL_APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation)
658 return es1::ClipPlanex(plane, equation);
661 GL_API void GL_APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
663 return es1::Color4f(red, green, blue, alpha);
666 GL_API void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
668 return es1::Color4ub(red, green, blue, alpha);
671 GL_API void GL_APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
673 return es1::Color4x(red, green, blue, alpha);
676 GL_API void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
678 return es1::ColorMask(red, green, blue, alpha);
681 GL_API void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
683 return es1::ColorPointer(size, type, stride, pointer);
686 GL_API void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
687 GLint border, GLsizei imageSize, const GLvoid* data)
689 return es1::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
692 GL_API void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
693 GLenum format, GLsizei imageSize, const GLvoid* data)
695 return es1::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
698 GL_API void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
700 return es1::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
703 GL_API void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
705 return es1::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
708 GL_API void GL_APIENTRY glCullFace(GLenum mode)
710 return es1::CullFace(mode);
713 GL_API void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
715 return es1::DeleteBuffers(n, buffers);
718 GL_API void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
720 return es1::DeleteFramebuffersOES(n, framebuffers);
723 GL_API void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
725 return es1::DeleteRenderbuffersOES(n, renderbuffers);
728 GL_API void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
730 return es1::DeleteTextures(n, textures);
733 GL_API void GL_APIENTRY glDepthFunc(GLenum func)
735 return es1::DepthFunc(func);
738 GL_API void GL_APIENTRY glDepthMask(GLboolean flag)
740 return es1::DepthMask(flag);
743 GL_API void GL_APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar)
745 return es1::DepthRangex(zNear, zFar);
748 GL_API void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
750 return es1::DepthRangef(zNear, zFar);
753 GL_API void GL_APIENTRY glDisable(GLenum cap)
755 return es1::Disable(cap);
758 GL_API void GL_APIENTRY glDisableClientState(GLenum array)
760 return es1::DisableClientState(array);
763 GL_API void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
765 return es1::DrawArrays(mode, first, count);
768 GL_API void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
770 return es1::DrawElements(mode, count, type, indices);
773 GL_API void GL_APIENTRY glEnable(GLenum cap)
775 return es1::Enable(cap);
778 GL_API void GL_APIENTRY glEnableClientState(GLenum array)
780 return es1::EnableClientState(array);
783 GL_API void GL_APIENTRY glFinish(void)
785 return es1::Finish();
788 GL_API void GL_APIENTRY glFlush(void)
793 GL_API void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
795 return es1::FramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
798 GL_API void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
800 return es1::FramebufferTexture2DOES(target, attachment, textarget, texture, level);
803 GL_API void GL_APIENTRY glFogf(GLenum pname, GLfloat param)
805 return es1::Fogf(pname, param);
808 GL_API void GL_APIENTRY glFogfv(GLenum pname, const GLfloat *params)
810 return es1::Fogfv(pname, params);
813 GL_API void GL_APIENTRY glFogx(GLenum pname, GLfixed param)
815 return es1::Fogx(pname, param);
818 GL_API void GL_APIENTRY glFogxv(GLenum pname, const GLfixed *params)
820 return es1::Fogxv(pname, params);
823 GL_API void GL_APIENTRY glFrontFace(GLenum mode)
825 return es1::FrontFace(mode);
828 GL_API void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
830 return es1::Frustumf(left, right, bottom, top, zNear, zFar);
833 GL_API void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
835 return es1::Frustumx(left, right, bottom, top, zNear, zFar);
838 GL_API void GL_APIENTRY glGenerateMipmapOES(GLenum target)
840 return es1::GenerateMipmapOES(target);
843 GL_API void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
845 return es1::GenBuffers(n, buffers);
848 GL_API void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
850 return es1::GenFramebuffersOES(n, framebuffers);
853 GL_API void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
855 return es1::GenRenderbuffersOES(n, renderbuffers);
858 GL_API void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
860 return es1::GenTextures(n, textures);
863 GL_API void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
865 return es1::GetRenderbufferParameterivOES(target, pname, params);
868 GL_API void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
870 return es1::GetBooleanv(pname, params);
873 GL_API void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
875 return es1::GetBufferParameteriv(target, pname, params);
878 GL_API void GL_APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4])
880 return es1::GetClipPlanef(pname, eqn);
883 GL_API void GL_APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4])
885 return es1::GetClipPlanex(pname, eqn);
888 GL_API GLenum GL_APIENTRY glGetError(void)
890 return es1::GetError();
893 GL_API void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed *params)
895 return es1::GetFixedv(pname, params);
898 GL_API void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
900 return es1::GetFloatv(pname, params);
903 GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
905 return es1::GetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
908 GL_API void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
910 return es1::GetIntegerv(pname, params);
913 GL_API void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
915 return es1::GetLightfv(light, pname, params);
918 GL_API void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params)
920 return es1::GetLightxv(light, pname, params);
923 GL_API void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
925 return es1::GetMaterialfv(face, pname, params);
928 GL_API void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
930 return es1::GetMaterialxv(face, pname, params);
933 GL_API void GL_APIENTRY glGetPointerv(GLenum pname, GLvoid **params)
935 return es1::GetPointerv(pname, params);
938 GL_API const GLubyte* GL_APIENTRY glGetString(GLenum name)
940 return es1::GetString(name);
943 GL_API void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
945 return es1::GetTexParameterfv(target, pname, params);
948 GL_API void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
950 return es1::GetTexParameteriv(target, pname, params);
953 GL_API void GL_APIENTRY glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params)
955 return es1::GetTexEnvfv(env, pname, params);
958 GL_API void GL_APIENTRY glGetTexEnviv(GLenum env, GLenum pname, GLint *params)
960 return es1::GetTexEnviv(env, pname, params);
963 GL_API void GL_APIENTRY glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params)
965 return es1::GetTexEnvxv(env, pname, params);
968 GL_API void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
970 return es1::GetTexParameterxv(target, pname, params);
973 GL_API void GL_APIENTRY glHint(GLenum target, GLenum mode)
975 return es1::Hint(target, mode);
978 GL_API GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
980 return es1::IsBuffer(buffer);
983 GL_API GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
985 return es1::IsEnabled(cap);
988 GL_API GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
990 return es1::IsFramebufferOES(framebuffer);
993 GL_API GLboolean GL_APIENTRY glIsTexture(GLuint texture)
995 return es1::IsTexture(texture);
998 GL_API GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
1000 return es1::IsRenderbufferOES(renderbuffer);
1003 GL_API void GL_APIENTRY glLightModelf(GLenum pname, GLfloat param)
1005 return es1::LightModelf(pname, param);
1008 GL_API void GL_APIENTRY glLightModelfv(GLenum pname, const GLfloat *params)
1010 return es1::LightModelfv(pname, params);
1013 GL_API void GL_APIENTRY glLightModelx(GLenum pname, GLfixed param)
1015 return es1::LightModelx(pname, param);
1018 GL_API void GL_APIENTRY glLightModelxv(GLenum pname, const GLfixed *params)
1020 return es1::LightModelxv(pname, params);
1023 GL_API void GL_APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
1025 return es1::Lightf(light, pname, param);
1028 GL_API void GL_APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
1030 return es1::Lightfv(light, pname, params);
1033 GL_API void GL_APIENTRY glLightx(GLenum light, GLenum pname, GLfixed param)
1035 return es1::Lightx(light, pname, param);
1038 GL_API void GL_APIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed *params)
1040 return es1::Lightxv(light, pname, params);
1043 GL_API void GL_APIENTRY glLineWidth(GLfloat width)
1045 return es1::LineWidth(width);
1048 GL_API void GL_APIENTRY glLineWidthx(GLfixed width)
1050 return es1::LineWidthx(width);
1053 GL_API void GL_APIENTRY glLoadIdentity(void)
1055 return es1::LoadIdentity();
1058 GL_API void GL_APIENTRY glLoadMatrixf(const GLfloat *m)
1060 return es1::LoadMatrixf(m);
1063 GL_API void GL_APIENTRY glLoadMatrixx(const GLfixed *m)
1065 return es1::LoadMatrixx(m);
1068 GL_API void GL_APIENTRY glLogicOp(GLenum opcode)
1070 return es1::LogicOp(opcode);
1073 GL_API void GL_APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param)
1075 return es1::Materialf(face, pname, param);
1078 GL_API void GL_APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
1080 return es1::Materialfv(face, pname, params);
1083 GL_API void GL_APIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param)
1085 return es1::Materialx(face, pname, param);
1088 GL_API void GL_APIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed *params)
1090 return es1::Materialxv(face, pname, params);
1093 GL_API void GL_APIENTRY glMatrixMode(GLenum mode)
1095 return es1::MatrixMode(mode);
1098 GL_API void GL_APIENTRY glMultMatrixf(const GLfloat *m)
1100 return es1::MultMatrixf(m);
1103 GL_API void GL_APIENTRY glMultMatrixx(const GLfixed *m)
1105 return es1::MultMatrixx(m);
1108 GL_API void GL_APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1110 return es1::MultiTexCoord4f(target, s, t, r, q);
1113 GL_API void GL_APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
1115 return es1::MultiTexCoord4x(target, s, t, r, q);
1118 GL_API void GL_APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1120 return es1::Normal3f(nx, ny, nz);
1123 GL_API void GL_APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz)
1125 return es1::Normal3x(nx, ny, nz);
1128 GL_API void GL_APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
1130 return es1::NormalPointer(type, stride, pointer);
1133 GL_API void GL_APIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
1135 return es1::Orthof(left, right, bottom, top, zNear, zFar);
1138 GL_API void GL_APIENTRY glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
1140 return es1::Orthox(left, right, bottom, top, zNear, zFar);
1143 GL_API void GL_APIENTRY glPixelStorei(GLenum pname, GLint param)
1145 return es1::PixelStorei(pname, param);
1148 GL_API void GL_APIENTRY glPointParameterf(GLenum pname, GLfloat param)
1150 return es1::PointParameterf(pname, param);
1153 GL_API void GL_APIENTRY glPointParameterfv(GLenum pname, const GLfloat *params)
1155 return es1::PointParameterfv(pname, params);
1158 GL_API void GL_APIENTRY glPointParameterx(GLenum pname, GLfixed param)
1160 return es1::PointParameterx(pname, param);
1163 GL_API void GL_APIENTRY glPointParameterxv(GLenum pname, const GLfixed *params)
1165 return es1::PointParameterxv(pname, params);
1168 GL_API void GL_APIENTRY glPointSize(GLfloat size)
1170 return es1::PointSize(size);
1173 GL_API void GL_APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer)
1175 return es1::PointSizePointerOES(type, stride, pointer);
1178 GL_API void GL_APIENTRY glPointSizex(GLfixed size)
1180 return es1::PointSizex(size);
1183 GL_API void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
1185 return es1::PolygonOffset(factor, units);
1188 GL_API void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units)
1190 return es1::PolygonOffsetx(factor, units);
1193 GL_API void GL_APIENTRY glPopMatrix(void)
1195 return es1::PopMatrix();
1198 GL_API void GL_APIENTRY glPushMatrix(void)
1200 return es1::PushMatrix();
1203 GL_API void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
1205 return es1::ReadPixels(x, y, width, height, format, type, pixels);
1208 GL_API void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1210 return es1::RenderbufferStorageOES(target, internalformat, width, height);
1213 GL_API void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
1215 return es1::Rotatef(angle, x, y, z);
1218 GL_API void GL_APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
1220 return es1::Rotatex(angle, x, y, z);
1223 GL_API void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
1225 return es1::SampleCoverage(value, invert);
1228 GL_API void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert)
1230 return es1::SampleCoveragex(value, invert);
1233 GL_API void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
1235 return es1::Scalef(x, y, z);
1238 GL_API void GL_APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z)
1240 return es1::Scalex(x, y, z);
1243 GL_API void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
1245 return es1::Scissor(x, y, width, height);
1248 GL_API void GL_APIENTRY glShadeModel(GLenum mode)
1250 return es1::ShadeModel(mode);
1253 GL_API void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
1255 return es1::StencilFunc(func, ref, mask);
1258 GL_API void GL_APIENTRY glStencilMask(GLuint mask)
1260 return es1::StencilMask(mask);
1263 GL_API void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
1265 return es1::StencilOp(fail, zfail, zpass);
1268 GL_API void GL_APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
1270 return es1::TexCoordPointer(size, type, stride, pointer);
1273 GL_API void GL_APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param)
1275 return es1::TexEnvf(target, pname, param);
1278 GL_API void GL_APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
1280 return es1::TexEnvfv(target, pname, params);
1283 GL_API void GL_APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param)
1285 return es1::TexEnvi(target, pname, param);
1288 GL_API void GL_APIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param)
1290 return es1::TexEnvx(target, pname, param);
1293 GL_API void GL_APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params)
1295 return es1::TexEnviv(target, pname, params);
1298 GL_API void GL_APIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
1300 return es1::TexEnvxv(target, pname, params);
1303 GL_API void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
1304 GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1306 return es1::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
1309 GL_API void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
1311 return es1::TexParameterf(target, pname, param);
1314 GL_API void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
1316 return es1::TexParameterfv(target, pname, params);
1319 GL_API void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
1321 return es1::TexParameteri(target, pname, param);
1324 GL_API void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
1326 return es1::TexParameteriv(target, pname, params);
1329 GL_API void GL_APIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param)
1331 return es1::TexParameterx(target, pname, param);
1334 GL_API void GL_APIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
1336 return es1::TexParameterxv(target, pname, params);
1339 GL_API void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
1340 GLenum format, GLenum type, const GLvoid* pixels)
1342 return es1::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
1345 GL_API void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
1347 return es1::Translatef(x, y, z);
1350 GL_API void GL_APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z)
1352 return es1::Translatex(x, y, z);
1355 GL_API void GL_APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
1357 return es1::VertexPointer(size, type, stride, pointer);
1360 GL_API void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
1362 return es1::Viewport(x, y, width, height);
1365 GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
1367 return es1::EGLImageTargetTexture2DOES(target, image);
1370 GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
1372 return es1::EGLImageTargetRenderbufferStorageOES(target, image);
1375 GL_API void GL_APIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
1377 return es1::DrawTexsOES(x,y, z, width, height);
1380 GL_API void GL_APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
1382 return es1::DrawTexiOES(x,y, z, width, height);
1385 GL_API void GL_APIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
1387 return es1::DrawTexxOES(x,y, z, width, height);
1390 GL_API void GL_APIENTRY glDrawTexsvOES(const GLshort *coords)
1392 return es1::DrawTexsvOES(coords);
1395 GL_API void GL_APIENTRY glDrawTexivOES(const GLint *coords)
1397 return es1::DrawTexivOES(coords);
1400 GL_API void GL_APIENTRY glDrawTexxvOES(const GLfixed *coords)
1402 return es1::DrawTexxvOES(coords);
1405 GL_API void GL_APIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
1407 return es1::DrawTexfOES(x, y, z, width, height);
1410 GL_API void GL_APIENTRY glDrawTexfvOES(const GLfloat *coords)
1412 return es1::DrawTexfvOES(coords);
1415 void GL_APIENTRY Register(const char *licenseKey)
1417 // Nothing to do, SwiftShader is open-source
1421 LibGLES_CMexports::LibGLES_CMexports()
1423 this->glActiveTexture = es1::ActiveTexture;
1424 this->glAlphaFunc = es1::AlphaFunc;
1425 this->glAlphaFuncx = es1::AlphaFuncx;
1426 this->glBindBuffer = es1::BindBuffer;
1427 this->glBindFramebuffer = es1::BindFramebuffer;
1428 this->glBindFramebufferOES = es1::BindFramebufferOES;
1429 this->glBindRenderbufferOES = es1::BindRenderbufferOES;
1430 this->glBindTexture = es1::BindTexture;
1431 this->glBlendEquationSeparateOES = es1::BlendEquationSeparateOES;
1432 this->glBlendEquationOES = es1::BlendEquationOES;
1433 this->glBlendEquationSeparateOES = es1::BlendEquationSeparateOES;
1434 this->glBlendFuncSeparateOES = es1::BlendFuncSeparateOES;
1435 this->glBlendFunc = es1::BlendFunc;
1436 this->glBlendFuncSeparateOES = es1::BlendFuncSeparateOES;
1437 this->glBufferData = es1::BufferData;
1438 this->glBufferSubData = es1::BufferSubData;
1439 this->glCheckFramebufferStatusOES = es1::CheckFramebufferStatusOES;
1440 this->glClear = es1::Clear;
1441 this->glClearColor = es1::ClearColor;
1442 this->glClearColorx = es1::ClearColorx;
1443 this->glClearDepthf = es1::ClearDepthf;
1444 this->glClearDepthx = es1::ClearDepthx;
1445 this->glClearStencil = es1::ClearStencil;
1446 this->glClientActiveTexture = es1::ClientActiveTexture;
1447 this->glClipPlanef = es1::ClipPlanef;
1448 this->glClipPlanex = es1::ClipPlanex;
1449 this->glColor4f = es1::Color4f;
1450 this->glColor4ub = es1::Color4ub;
1451 this->glColor4x = es1::Color4x;
1452 this->glColorMask = es1::ColorMask;
1453 this->glColorPointer = es1::ColorPointer;
1454 this->glCompressedTexImage2D = es1::CompressedTexImage2D;
1455 this->glCompressedTexSubImage2D = es1::CompressedTexSubImage2D;
1456 this->glCopyTexImage2D = es1::CopyTexImage2D;
1457 this->glCopyTexSubImage2D = es1::CopyTexSubImage2D;
1458 this->glCullFace = es1::CullFace;
1459 this->glDeleteBuffers = es1::DeleteBuffers;
1460 this->glDeleteFramebuffersOES = es1::DeleteFramebuffersOES;
1461 this->glDeleteRenderbuffersOES = es1::DeleteRenderbuffersOES;
1462 this->glDeleteTextures = es1::DeleteTextures;
1463 this->glDepthFunc = es1::DepthFunc;
1464 this->glDepthMask = es1::DepthMask;
1465 this->glDepthRangex = es1::DepthRangex;
1466 this->glDepthRangef = es1::DepthRangef;
1467 this->glDisable = es1::Disable;
1468 this->glDisableClientState = es1::DisableClientState;
1469 this->glDrawArrays = es1::DrawArrays;
1470 this->glDrawElements = es1::DrawElements;
1471 this->glEnable = es1::Enable;
1472 this->glEnableClientState = es1::EnableClientState;
1473 this->glFinish = es1::Finish;
1474 this->glFlush = es1::Flush;
1475 this->glFramebufferRenderbufferOES = es1::FramebufferRenderbufferOES;
1476 this->glFramebufferTexture2DOES = es1::FramebufferTexture2DOES;
1477 this->glFogf = es1::Fogf;
1478 this->glFogfv = es1::Fogfv;
1479 this->glFogx = es1::Fogx;
1480 this->glFogxv = es1::Fogxv;
1481 this->glFrontFace = es1::FrontFace;
1482 this->glFrustumf = es1::Frustumf;
1483 this->glFrustumx = es1::Frustumx;
1484 this->glGenerateMipmapOES = es1::GenerateMipmapOES;
1485 this->glGenBuffers = es1::GenBuffers;
1486 this->glGenFramebuffersOES = es1::GenFramebuffersOES;
1487 this->glGenRenderbuffersOES = es1::GenRenderbuffersOES;
1488 this->glGenTextures = es1::GenTextures;
1489 this->glGetRenderbufferParameterivOES = es1::GetRenderbufferParameterivOES;
1490 this->glGetBooleanv = es1::GetBooleanv;
1491 this->glGetBufferParameteriv = es1::GetBufferParameteriv;
1492 this->glGetClipPlanef = es1::GetClipPlanef;
1493 this->glGetClipPlanex = es1::GetClipPlanex;
1494 this->glGetError = es1::GetError;
1495 this->glGetFixedv = es1::GetFixedv;
1496 this->glGetFloatv = es1::GetFloatv;
1497 this->glGetFramebufferAttachmentParameterivOES = es1::GetFramebufferAttachmentParameterivOES;
1498 this->glGetIntegerv = es1::GetIntegerv;
1499 this->glGetLightfv = es1::GetLightfv;
1500 this->glGetLightxv = es1::GetLightxv;
1501 this->glGetMaterialfv = es1::GetMaterialfv;
1502 this->glGetMaterialxv = es1::GetMaterialxv;
1503 this->glGetPointerv = es1::GetPointerv;
1504 this->glGetString = es1::GetString;
1505 this->glGetTexParameterfv = es1::GetTexParameterfv;
1506 this->glGetTexParameteriv = es1::GetTexParameteriv;
1507 this->glGetTexEnvfv = es1::GetTexEnvfv;
1508 this->glGetTexEnviv = es1::GetTexEnviv;
1509 this->glGetTexEnvxv = es1::GetTexEnvxv;
1510 this->glGetTexParameterxv = es1::GetTexParameterxv;
1511 this->glHint = es1::Hint;
1512 this->glIsBuffer = es1::IsBuffer;
1513 this->glIsEnabled = es1::IsEnabled;
1514 this->glIsFramebufferOES = es1::IsFramebufferOES;
1515 this->glIsTexture = es1::IsTexture;
1516 this->glIsRenderbufferOES = es1::IsRenderbufferOES;
1517 this->glLightModelf = es1::LightModelf;
1518 this->glLightModelfv = es1::LightModelfv;
1519 this->glLightModelx = es1::LightModelx;
1520 this->glLightModelxv = es1::LightModelxv;
1521 this->glLightf = es1::Lightf;
1522 this->glLightfv = es1::Lightfv;
1523 this->glLightx = es1::Lightx;
1524 this->glLightxv = es1::Lightxv;
1525 this->glLineWidth = es1::LineWidth;
1526 this->glLineWidthx = es1::LineWidthx;
1527 this->glLoadIdentity = es1::LoadIdentity;
1528 this->glLoadMatrixf = es1::LoadMatrixf;
1529 this->glLoadMatrixx = es1::LoadMatrixx;
1530 this->glLogicOp = es1::LogicOp;
1531 this->glMaterialf = es1::Materialf;
1532 this->glMaterialfv = es1::Materialfv;
1533 this->glMaterialx = es1::Materialx;
1534 this->glMaterialxv = es1::Materialxv;
1535 this->glMatrixMode = es1::MatrixMode;
1536 this->glMultMatrixf = es1::MultMatrixf;
1537 this->glMultMatrixx = es1::MultMatrixx;
1538 this->glMultiTexCoord4f = es1::MultiTexCoord4f;
1539 this->glMultiTexCoord4x = es1::MultiTexCoord4x;
1540 this->glNormal3f = es1::Normal3f;
1541 this->glNormal3x = es1::Normal3x;
1542 this->glNormalPointer = es1::NormalPointer;
1543 this->glOrthof = es1::Orthof;
1544 this->glOrthox = es1::Orthox;
1545 this->glPixelStorei = es1::PixelStorei;
1546 this->glPointParameterf = es1::PointParameterf;
1547 this->glPointParameterfv = es1::PointParameterfv;
1548 this->glPointParameterx = es1::PointParameterx;
1549 this->glPointParameterxv = es1::PointParameterxv;
1550 this->glPointSize = es1::PointSize;
1551 this->glPointSizePointerOES = es1::PointSizePointerOES;
1552 this->glPointSizex = es1::PointSizex;
1553 this->glPolygonOffset = es1::PolygonOffset;
1554 this->glPolygonOffsetx = es1::PolygonOffsetx;
1555 this->glPopMatrix = es1::PopMatrix;
1556 this->glPushMatrix = es1::PushMatrix;
1557 this->glReadPixels = es1::ReadPixels;
1558 this->glRenderbufferStorageOES = es1::RenderbufferStorageOES;
1559 this->glRotatef = es1::Rotatef;
1560 this->glRotatex = es1::Rotatex;
1561 this->glSampleCoverage = es1::SampleCoverage;
1562 this->glSampleCoveragex = es1::SampleCoveragex;
1563 this->glScalef = es1::Scalef;
1564 this->glScalex = es1::Scalex;
1565 this->glScissor = es1::Scissor;
1566 this->glShadeModel = es1::ShadeModel;
1567 this->glStencilFunc = es1::StencilFunc;
1568 this->glStencilMask = es1::StencilMask;
1569 this->glStencilOp = es1::StencilOp;
1570 this->glTexCoordPointer = es1::TexCoordPointer;
1571 this->glTexEnvf = es1::TexEnvf;
1572 this->glTexEnvfv = es1::TexEnvfv;
1573 this->glTexEnvi = es1::TexEnvi;
1574 this->glTexEnvx = es1::TexEnvx;
1575 this->glTexEnviv = es1::TexEnviv;
1576 this->glTexEnvxv = es1::TexEnvxv;
1577 this->glTexImage2D = es1::TexImage2D;
1578 this->glTexParameterf = es1::TexParameterf;
1579 this->glTexParameterfv = es1::TexParameterfv;
1580 this->glTexParameteri = es1::TexParameteri;
1581 this->glTexParameteriv = es1::TexParameteriv;
1582 this->glTexParameterx = es1::TexParameterx;
1583 this->glTexParameterxv = es1::TexParameterxv;
1584 this->glTexSubImage2D = es1::TexSubImage2D;
1585 this->glTranslatef = es1::Translatef;
1586 this->glTranslatex = es1::Translatex;
1587 this->glVertexPointer = es1::VertexPointer;
1588 this->glViewport = es1::Viewport;
1589 this->glEGLImageTargetTexture2DOES = es1::EGLImageTargetTexture2DOES;
1590 this->glEGLImageTargetRenderbufferStorageOES = es1::EGLImageTargetRenderbufferStorageOES;
1591 this->glDrawTexsOES = es1::DrawTexsOES;
1592 this->glDrawTexiOES = es1::DrawTexiOES;
1593 this->glDrawTexxOES = es1::DrawTexxOES;
1594 this->glDrawTexsvOES = es1::DrawTexsvOES;
1595 this->glDrawTexivOES = es1::DrawTexivOES;
1596 this->glDrawTexxvOES = es1::DrawTexxvOES;
1597 this->glDrawTexfOES = es1::DrawTexfOES;
1598 this->glDrawTexfvOES = es1::DrawTexfvOES;
1600 this->es1CreateContext = ::es1CreateContext;
1601 this->es1GetProcAddress = ::es1GetProcAddress;
1602 this->createBackBuffer = ::createBackBuffer;
1603 this->createDepthStencil = ::createDepthStencil;
1604 this->createFrameBuffer = ::createFrameBuffer;
1607 extern "C" GL_API LibGLES_CMexports *libGLES_CM_swiftshader()
1609 static LibGLES_CMexports libGLES_CM;