opengl translator: Fix windows runtime problems

fixed functions calling conventions in dispatch tables,
added link flag to translator libraries to produce an alias
function for all exported functions with stdcall name mangling.

Change-Id: I4360f26da1f897764ba6d4dd02c365ed00420b51
This commit is contained in:
Amit Feller
2011-06-21 10:21:36 +03:00
committed by Guy Zadickario
parent a20ba0e4de
commit 87363ca283
8 changed files with 360 additions and 343 deletions

View File

@@ -35,32 +35,32 @@ public:
void setContextData(GLDecoderContextData *contextData) { m_contextData = contextData; }
private:
static void s_glGetCompressedTextureFormats(void * self, GLint cont, GLint *data);
static void s_glVertexPointerData(void *self, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void s_glVertexPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glGetCompressedTextureFormats(void * self, GLint cont, GLint *data);
static void gl_APIENTRY s_glVertexPointerData(void *self, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void gl_APIENTRY s_glVertexPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void s_glColorPointerData(void *self, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void s_glColorPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glColorPointerData(void *self, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void gl_APIENTRY s_glColorPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void s_glTexCoordPointerData(void *self, GLint unit, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void s_glTexCoordPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glTexCoordPointerData(void *self, GLint unit, GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void gl_APIENTRY s_glTexCoordPointerOffset(void *self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void s_glNormalPointerData(void *self, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void s_glNormalPointerOffset(void *self, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glNormalPointerData(void *self, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void gl_APIENTRY s_glNormalPointerOffset(void *self, GLenum type, GLsizei stride, GLuint offset);
static void s_glPointSizePointerData(void *self, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void s_glPointSizePointerOffset(void *self, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glPointSizePointerData(void *self, GLenum type, GLsizei stride, void *data, GLuint datalen);
static void gl_APIENTRY s_glPointSizePointerOffset(void *self, GLenum type, GLsizei stride, GLuint offset);
static void s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset);
static void s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen);
static void gl_APIENTRY s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset);
static void gl_APIENTRY s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen);
static void s_glWeightPointerData(void * self, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen);
static void s_glWeightPointerOffset(void * self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glWeightPointerData(void * self, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen);
static void gl_APIENTRY s_glWeightPointerOffset(void * self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void s_glMatrixIndexPointerData(void * self, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen);
static void s_glMatrixIndexPointerOffset(void * self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static void gl_APIENTRY s_glMatrixIndexPointerData(void * self, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen);
static void gl_APIENTRY s_glMatrixIndexPointerOffset(void * self, GLint size, GLenum type, GLsizei stride, GLuint offset);
static int s_glFinishRoundTrip(void *self);
static int gl_APIENTRY s_glFinishRoundTrip(void *self);
static void * s_getProc(const char *name, void *userData);

View File

@@ -22,14 +22,14 @@ private:
osUtils::dynLibrary * m_GL2library;
static void *s_getProc(const char *name, void *userData);
static void s_glGetCompressedTextureFormats(void *self, int count, GLint *formats);
static void s_glVertexAttribPointerData(void *self, GLuint indx, GLint size, GLenum type,
static void gl2_APIENTRY s_glGetCompressedTextureFormats(void *self, int count, GLint *formats);
static void gl2_APIENTRY s_glVertexAttribPointerData(void *self, GLuint indx, GLint size, GLenum type,
GLboolean normalized, GLsizei stride, void * data, GLuint datalen);
static void s_glVertexAttribPointerOffset(void *self, GLuint indx, GLint size, GLenum type,
static void gl2_APIENTRY s_glVertexAttribPointerOffset(void *self, GLuint indx, GLint size, GLenum type,
GLboolean normalized, GLsizei stride, GLuint offset);
static void s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset);
static void s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen);
static void s_glShaderString(void *self, GLuint shader, const GLchar* string, GLsizei len);
static void gl2_APIENTRY s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset);
static void gl2_APIENTRY s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen);
static void gl2_APIENTRY s_glShaderString(void *self, GLuint shader, const GLchar* string, GLsizei len);
};
#endif

View File

@@ -157,7 +157,7 @@ static __translatorMustCastToProperFunctionPointerType getProcAddress(const char
return ret;
}
GLESiface* __translator_getIfaces(EGLiface* eglIface){
GL_API GLESiface* __translator_getIfaces(EGLiface* eglIface){
s_eglIface = eglIface;
return & s_glesIface;
}

View File

@@ -26,6 +26,8 @@ endif
ifeq ($(HOST_OS),windows)
$(call emugl-export,LDLIBS,-lopengl32 -lgdi32)
GL_COMMON_LINKER_FLAGS := -Wl,--add-stdcall-alias
$(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS))
endif
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)

View File

@@ -20,49 +20,49 @@
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/eglext.h>
typedef EGLint (* eglGetError_t) ();
typedef EGLDisplay (* eglGetDisplay_t) (EGLNativeDisplayType);
typedef EGLBoolean (* eglInitialize_t) (EGLDisplay, EGLint*, EGLint*);
typedef EGLBoolean (* eglTerminate_t) (EGLDisplay);
typedef char* (* eglQueryString_t) (EGLDisplay, EGLint);
typedef EGLBoolean (* eglGetConfigs_t) (EGLDisplay, EGLConfig*, EGLint, EGLint*);
typedef EGLBoolean (* eglChooseConfig_t) (EGLDisplay, const EGLint*, EGLConfig*, EGLint, EGLint*);
typedef EGLBoolean (* eglGetConfigAttrib_t) (EGLDisplay, EGLConfig, EGLint, EGLint*);
typedef EGLSurface (* eglCreateWindowSurface_t) (EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*);
typedef EGLSurface (* eglCreatePbufferSurface_t) (EGLDisplay, EGLConfig, const EGLint*);
typedef EGLSurface (* eglCreatePixmapSurface_t) (EGLDisplay, EGLConfig, EGLNativePixmapType, const EGLint*);
typedef EGLBoolean (* eglDestroySurface_t) (EGLDisplay, EGLSurface);
typedef EGLBoolean (* eglQuerySurface_t) (EGLDisplay, EGLSurface, EGLint, EGLint*);
typedef EGLBoolean (* eglBindAPI_t) (EGLenum);
typedef EGLint (EGLAPIENTRY *eglGetError_t) ();
typedef EGLDisplay (EGLAPIENTRY *eglGetDisplay_t) (EGLNativeDisplayType);
typedef EGLBoolean (EGLAPIENTRY *eglInitialize_t) (EGLDisplay, EGLint*, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglTerminate_t) (EGLDisplay);
typedef char* (EGLAPIENTRY *eglQueryString_t) (EGLDisplay, EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglGetConfigs_t) (EGLDisplay, EGLConfig*, EGLint, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglChooseConfig_t) (EGLDisplay, const EGLint*, EGLConfig*, EGLint, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglGetConfigAttrib_t) (EGLDisplay, EGLConfig, EGLint, EGLint*);
typedef EGLSurface (EGLAPIENTRY *eglCreateWindowSurface_t) (EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*);
typedef EGLSurface (EGLAPIENTRY *eglCreatePbufferSurface_t) (EGLDisplay, EGLConfig, const EGLint*);
typedef EGLSurface (EGLAPIENTRY *eglCreatePixmapSurface_t) (EGLDisplay, EGLConfig, EGLNativePixmapType, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglDestroySurface_t) (EGLDisplay, EGLSurface);
typedef EGLBoolean (EGLAPIENTRY *eglQuerySurface_t) (EGLDisplay, EGLSurface, EGLint, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglBindAPI_t) (EGLenum);
typedef EGLenum (* eglQueryAPI_t) ();
typedef EGLBoolean (* eglWaitClient_t) ();
typedef EGLBoolean (* eglReleaseThread_t) ();
typedef EGLSurface (* eglCreatePbufferFromClientBuffer_t) (EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint*);
typedef EGLBoolean (* eglSurfaceAttrib_t) (EGLDisplay, EGLSurface, EGLint, EGLint);
typedef EGLBoolean (* eglBindTexImage_t) (EGLDisplay, EGLSurface, EGLint);
typedef EGLBoolean (* eglReleaseTexImage_t) (EGLDisplay, EGLSurface, EGLint);
typedef EGLBoolean (* eglSwapInterval_t) (EGLDisplay, EGLint);
typedef EGLContext (* eglCreateContext_t) (EGLDisplay, EGLConfig, EGLContext, const EGLint*);
typedef EGLBoolean (* eglDestroyContext_t) (EGLDisplay, EGLContext);
typedef EGLBoolean (* eglMakeCurrent_t) (EGLDisplay, EGLSurface, EGLSurface, EGLContext);
typedef EGLContext (* eglGetCurrentContext_t) ();
typedef EGLSurface (* eglGetCurrentSurface_t) (EGLint);
typedef EGLDisplay (* eglGetCurrentDisplay_t) ();
typedef EGLBoolean (* eglQueryContext_t) (EGLDisplay, EGLContext, EGLint, EGLint*);
typedef EGLBoolean (* eglWaitGL_t) ();
typedef EGLBoolean (* eglWaitNative_t) (EGLint);
typedef EGLBoolean (* eglSwapBuffers_t) (EGLDisplay, EGLSurface);
typedef EGLBoolean (* eglCopyBuffers_t) (EGLDisplay, EGLSurface, EGLNativePixmapType);
typedef __eglMustCastToProperFunctionPointerType (* eglGetProcAddress_t) (const char*);
typedef EGLBoolean (* eglLockSurfaceKHR_t) (EGLDisplay, EGLSurface, const EGLint*);
typedef EGLBoolean (* eglUnlockSurfaceKHR_t) (EGLDisplay, EGLSurface);
typedef EGLImageKHR (* eglCreateImageKHR_t) (EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint*);
typedef EGLBoolean (* eglDestroyImageKHR_t) (EGLDisplay, EGLImageKHR image);
typedef EGLSyncKHR (* eglCreateSyncKHR_t) (EGLDisplay, EGLenum, const EGLint*);
typedef EGLBoolean (* eglDestroySyncKHR_t) (EGLDisplay, EGLSyncKHR sync);
typedef EGLint (* eglClientWaitSyncKHR_t) (EGLDisplay, EGLSyncKHR, EGLint, EGLTimeKHR timeout);
typedef EGLBoolean (* eglSignalSyncKHR_t) (EGLDisplay, EGLSyncKHR, EGLenum);
typedef EGLBoolean (* eglGetSyncAttribKHR_t) (EGLDisplay, EGLSyncKHR, EGLint, EGLint*);
typedef EGLBoolean (* eglSetSwapRectangleANDROID_t) (EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglWaitClient_t) ();
typedef EGLBoolean (EGLAPIENTRY *eglReleaseThread_t) ();
typedef EGLSurface (EGLAPIENTRY *eglCreatePbufferFromClientBuffer_t) (EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglSurfaceAttrib_t) (EGLDisplay, EGLSurface, EGLint, EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglBindTexImage_t) (EGLDisplay, EGLSurface, EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglReleaseTexImage_t) (EGLDisplay, EGLSurface, EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglSwapInterval_t) (EGLDisplay, EGLint);
typedef EGLContext (EGLAPIENTRY *eglCreateContext_t) (EGLDisplay, EGLConfig, EGLContext, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglDestroyContext_t) (EGLDisplay, EGLContext);
typedef EGLBoolean (EGLAPIENTRY *eglMakeCurrent_t) (EGLDisplay, EGLSurface, EGLSurface, EGLContext);
typedef EGLContext (EGLAPIENTRY *eglGetCurrentContext_t) ();
typedef EGLSurface (EGLAPIENTRY *eglGetCurrentSurface_t) (EGLint);
typedef EGLDisplay (EGLAPIENTRY *eglGetCurrentDisplay_t) ();
typedef EGLBoolean (EGLAPIENTRY *eglQueryContext_t) (EGLDisplay, EGLContext, EGLint, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglWaitGL_t) ();
typedef EGLBoolean (EGLAPIENTRY *eglWaitNative_t) (EGLint);
typedef EGLBoolean (EGLAPIENTRY *eglSwapBuffers_t) (EGLDisplay, EGLSurface);
typedef EGLBoolean (EGLAPIENTRY *eglCopyBuffers_t) (EGLDisplay, EGLSurface, EGLNativePixmapType);
typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRY *eglGetProcAddress_t) (const char*);
typedef EGLBoolean (EGLAPIENTRY *eglLockSurfaceKHR_t) (EGLDisplay, EGLSurface, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglUnlockSurfaceKHR_t) (EGLDisplay, EGLSurface);
typedef EGLImageKHR (EGLAPIENTRY *eglCreateImageKHR_t) (EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglDestroyImageKHR_t) (EGLDisplay, EGLImageKHR image);
typedef EGLSyncKHR (EGLAPIENTRY *eglCreateSyncKHR_t) (EGLDisplay, EGLenum, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglDestroySyncKHR_t) (EGLDisplay, EGLSyncKHR sync);
typedef EGLint (EGLAPIENTRY *eglClientWaitSyncKHR_t) (EGLDisplay, EGLSyncKHR, EGLint, EGLTimeKHR timeout);
typedef EGLBoolean (EGLAPIENTRY *eglSignalSyncKHR_t) (EGLDisplay, EGLSyncKHR, EGLenum);
typedef EGLBoolean (EGLAPIENTRY *eglGetSyncAttribKHR_t) (EGLDisplay, EGLSyncKHR, EGLint, EGLint*);
typedef EGLBoolean (EGLAPIENTRY *eglSetSwapRectangleANDROID_t) (EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint);
#endif // of _EGL_PROC_H

View File

@@ -20,277 +20,277 @@
#define GL_GLEXT_PROTOTYPES
#include <GLES/glext.h>
typedef void (* glAlphaFunc_t) (GLenum, GLclampf);
typedef void (* glClearColor_t) (GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (* glClearDepthf_t) (GLclampf);
typedef void (* glClipPlanef_t) (GLenum, const GLfloat*);
typedef void (* glColor4f_t) (GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glDepthRangef_t) (GLclampf, GLclampf);
typedef void (* glFogf_t) (GLenum, GLfloat);
typedef void (* glFogfv_t) (GLenum, const GLfloat*);
typedef void (* glFrustumf_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glGetClipPlanef_t) (GLenum, GLfloat);
typedef void (* glGetFloatv_t) (GLenum, GLfloat*);
typedef void (* glGetLightfv_t) (GLenum, GLenum, GLfloat*);
typedef void (* glGetMaterialfv_t) (GLenum, GLenum, GLfloat*);
typedef void (* glGetTexEnvfv_t) (GLenum, GLenum, GLfloat*);
typedef void (* glGetTexParameterfv_t) (GLenum, GLenum, GLfloat*);
typedef void (* glLightModelf_t) (GLenum, GLfloat);
typedef void (* glLightModelfv_t) (GLenum, const GLfloat*);
typedef void (* glLightf_t) (GLenum, GLenum, GLfloat);
typedef void (* glLightfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (* glLineWidth_t) (GLfloat);
typedef void (* glLoadMatrixf_t) (const GLfloat*);
typedef void (* glMaterialf_t) (GLenum, GLenum, GLfloat);
typedef void (* glMaterialfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (* glMultMatrixf_t) (const GLfloat*);
typedef void (* glMultiTexCoord4f_t) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glNormal3f_t) (GLfloat, GLfloat, GLfloat);
typedef void (* glOrthof_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glPointParameterf_t) (GLenum, GLfloat);
typedef void (* glPointParameterfv_t) (GLenum, const GLfloat*);
typedef void (* glPointSize_t) (GLfloat);
typedef void (* glPolygonOffset_t) (GLfloat, GLfloat);
typedef void (* glRotatef_t) (GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glScalef_t) (GLfloat, GLfloat, GLfloat);
typedef void (* glTexEnvf_t) (GLenum, GLenum, GLfloat);
typedef void (* glTexEnvfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (* glTexParameterf_t) (GLenum, GLenum, GLfloat);
typedef void (* glTexParameterfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (* glTranslatef_t) (GLfloat, GLfloat, GLfloat);
typedef void (* glActiveTexture_t) (GLenum);
typedef void (* glAlphaFuncx_t) (GLenum, GLclampx);
typedef void (* glBindBuffer_t) (GLenum, GLuint);
typedef void (* glBindTexture_t) (GLenum, GLuint);
typedef void (* glBlendFunc_t) (GLenum, GLenum);
typedef void (* glBufferData_t) (GLenum, GLsizeiptr, const GLvoid*, GLenum);
typedef void (* glBufferSubData_t) (GLenum, GLintptr, GLsizeiptr, const GLvoid*);
typedef void (* glClear_t) (GLbitfield);
typedef void (* glClearColorx_t) (GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (* glClearDepthx_t) (GLclampx);
typedef void (* glClearStencil_t) (GLint);
typedef void (* glClientActiveTexture_t) (GLenum);
typedef void (* glClipPlanex_t) (GLenum, const GLfixed*);
typedef void (* glColor4ub_t) (GLubyte, GLubyte, GLubyte, GLubyte);
typedef void (* glColor4x_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glColorMask_t) (GLboolean, GLboolean, GLboolean, GLboolean);
typedef void (* glColorPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (* glCompressedTexImage2D_t) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
typedef void (* glCompressedTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
typedef void (* glCopyTexImage2D_t) (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
typedef void (* glCopyTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef void (* glCullFace_t) (GLenum);
typedef void (* glDeleteBuffers_t) (GLsizei, const GLuint*);
typedef void (* glDeleteTextures_t) (GLsizei, const GLuint*);
typedef void (* glDepthFunc_t) (GLenum);
typedef void (* glDepthMask_t) (GLboolean);
typedef void (* glDepthRangex_t) (GLclampx, GLclampx);
typedef void (* glDisable_t) (GLenum);
typedef void (* glDisableClientState_t) (GLenum);
typedef void (* glDrawArrays_t) (GLenum, GLint, GLsizei);
typedef void (* glDrawElements_t) (GLenum, GLsizei, GLenum, const GLvoid*);
typedef void (* glEnable_t) (GLenum);
typedef void (* glEnableClientState_t) (GLenum);
typedef void (* glFinish_t) ();
typedef void (* glFlush_t) ();
typedef void (* glFogx_t) (GLenum, GLfixed);
typedef void (* glFogxv_t) (GLenum, const GLfixed*);
typedef void (* glFrontFace_t) (GLenum);
typedef void (* glFrustumx_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glGetBooleanv_t) (GLenum, GLboolean*);
typedef void (* glGetBufferParameteriv_t) (GLenum, GLenum, GLint*);
typedef void (* glGetClipPlanex_t) (GLenum, GLfixed);
typedef void (* glGenBuffers_t) (GLsizei, GLuint*);
typedef void (* glGenTextures_t) (GLsizei, GLuint*);
typedef GLenum (* glGetError_t) ();
typedef void (* glGetFixedv_t) (GLenum, GLfixed*);
typedef void (* glGetIntegerv_t) (GLenum, GLint*);
typedef void (* glGetLightxv_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetMaterialxv_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetPointerv_t) (GLenum, GLvoid*);
typedef const GLubyte* (* glGetString_t) (GLenum);
typedef void (* glGetTexEnviv_t) (GLenum, GLenum, GLint*);
typedef void (* glGetTexEnvxv_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetTexParameteriv_t) (GLenum, GLenum, GLint*);
typedef void (* glGetTexParameterxv_t) (GLenum, GLenum, GLfixed*);
typedef void (* glHint_t) (GLenum, GLenum);
typedef GLboolean (* glIsBuffer_t) (GLuint);
typedef GLboolean (* glIsEnabled_t) (GLenum);
typedef GLboolean (* glIsTexture_t) (GLuint);
typedef void (* glLightModelx_t) (GLenum, GLfixed);
typedef void (* glLightModelxv_t) (GLenum, const GLfixed*);
typedef void (* glLightx_t) (GLenum, GLenum, GLfixed);
typedef void (* glLightxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glLineWidthx_t) (GLfixed);
typedef void (* glLoadIdentity_t) ();
typedef void (* glLoadMatrixx_t) (const GLfixed*);
typedef void (* glLogicOp_t) (GLenum);
typedef void (* glMaterialx_t) (GLenum, GLenum, GLfixed);
typedef void (* glMaterialxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glMatrixMode_t) (GLenum);
typedef void (* glMultMatrixx_t) (const GLfixed*);
typedef void (* glMultiTexCoord4x_t) (GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glNormal3x_t) (GLfixed, GLfixed, GLfixed);
typedef void (* glNormalPointer_t) (GLenum, GLsizei, const GLvoid*);
typedef void (* glOrthox_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glPixelStorei_t) (GLenum, GLint);
typedef void (* glPointParameterx_t) (GLenum, GLfixed);
typedef void (* glPointParameterxv_t) (GLenum, const GLfixed*);
typedef void (* glPointSizex_t) (GLfixed);
typedef void (* glPolygonOffsetx_t) (GLfixed, GLfixed);
typedef void (* glPopMatrix_t) ();
typedef void (* glPushMatrix_t) ();
typedef void (* glReadPixels_t) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (* glRotatex_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glSampleCoverage_t) (GLclampf, GLboolean);
typedef void (* glSampleCoveragex_t) (GLclampx, GLboolean);
typedef void (* glScalex_t) (GLfixed, GLfixed, GLfixed);
typedef void (* glScissor_t) (GLint, GLint, GLsizei, GLsizei);
typedef void (* glShadeModel_t) (GLenum);
typedef void (* glStencilFunc_t) (GLenum, GLint, GLuint);
typedef void (* glStencilMask_t) (GLuint);
typedef void (* glStencilOp_t) (GLenum, GLenum, GLenum);
typedef void (* glTexCoordPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (* glTexEnvi_t) (GLenum, GLenum, GLint);
typedef void (* glTexEnvx_t) (GLenum, GLenum, GLfixed);
typedef void (* glTexEnviv_t) (GLenum, GLenum, const GLint*);
typedef void (* glTexEnvxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glTexImage2D_t) (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
typedef void (* glTexParameteri_t) (GLenum, GLenum, GLint);
typedef void (* glTexParameterx_t) (GLenum, GLenum, GLfixed);
typedef void (* glTexParameteriv_t) (GLenum, GLenum, const GLint*);
typedef void (* glTexParameterxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*);
typedef void (* glTranslatex_t) (GLfixed, GLfixed, GLfixed);
typedef void (* glVertexPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (* glViewport_t) (GLint, GLint, GLsizei, GLsizei);
typedef void (* glPointSizePointerOES_t) (GLenum, GLsizei, const GLvoid*);
typedef void (* glBlendEquationSeparateOES_t) (GLenum, GLenum);
typedef void (* glBlendFuncSeparateOES_t) (GLenum, GLenum, GLenum, GLenum);
typedef void (* glBlendEquationOES_t) (GLenum);
typedef void (* glDrawTexsOES_t) (GLshort, GLshort, GLshort, GLshort, GLshort);
typedef void (* glDrawTexiOES_t) (GLint, GLint, GLint, GLint, GLint);
typedef void (* glDrawTexxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glDrawTexsvOES_t) (const GLshort*);
typedef void (* glDrawTexivOES_t) (const GLint*);
typedef void (* glDrawTexxvOES_t) (const GLfixed*);
typedef void (* glDrawTexfOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glDrawTexfvOES_t) (const GLfloat*);
typedef void (* glEGLImageTargetTexture2DOES_t) (GLenum, GLeglImageOES);
typedef void (* glEGLImageTargetRenderbufferStorageOES_t) (GLenum, GLeglImageOES);
typedef void (* glAlphaFuncxOES_t) (GLenum, GLclampx);
typedef void (* glClearColorxOES_t) (GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (* glClearDepthxOES_t) (GLclampx);
typedef void (* glClipPlanexOES_t) (GLenum, const GLfixed*);
typedef void (* glColor4xOES_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glDepthRangexOES_t) (GLclampx, GLclampx);
typedef void (* glFogxOES_t) (GLenum, GLfixed);
typedef void (* glFogxvOES_t) (GLenum, const GLfixed*);
typedef void (* glFrustumxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glGetClipPlanexOES_t) (GLenum, GLfixed);
typedef void (* glGetFixedvOES_t) (GLenum, GLfixed*);
typedef void (* glGetLightxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetMaterialxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetTexEnvxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (* glGetTexParameterxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (* glLightModelxOES_t) (GLenum, GLfixed);
typedef void (* glLightModelxvOES_t) (GLenum, const GLfixed*);
typedef void (* glLightxOES_t) (GLenum, GLenum, GLfixed);
typedef void (* glLightxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glLineWidthxOES_t) (GLfixed);
typedef void (* glLoadMatrixxOES_t) (const GLfixed*);
typedef void (* glMaterialxOES_t) (GLenum, GLenum, GLfixed);
typedef void (* glMaterialxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glMultMatrixxOES_t) (const GLfixed*);
typedef void (* glMultiTexCoord4xOES_t) (GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glNormal3xOES_t) (GLfixed, GLfixed, GLfixed);
typedef void (* glOrthoxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glPointParameterxOES_t) (GLenum, GLfixed);
typedef void (* glPointParameterxvOES_t) (GLenum, const GLfixed*);
typedef void (* glPointSizexOES_t) (GLfixed);
typedef void (* glPolygonOffsetxOES_t) (GLfixed, GLfixed);
typedef void (* glRotatexOES_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (* glSampleCoveragexOES_t) (GLclampx, GLboolean);
typedef void (* glScalexOES_t) (GLfixed, GLfixed, GLfixed);
typedef void (* glTexEnvxOES_t) (GLenum, GLenum, GLfixed);
typedef void (* glTexEnvxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glTexParameterxOES_t) (GLenum, GLenum, GLfixed);
typedef void (* glTexParameterxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glTranslatexOES_t) (GLfixed, GLfixed, GLfixed);
typedef GLboolean (* glIsRenderbufferOES_t) (GLuint);
typedef void (* glBindRenderbufferOES_t) (GLenum, GLuint);
typedef void (* glDeleteRenderbuffersOES_t) (GLsizei, const GLuint*);
typedef void (* glGenRenderbuffersOES_t) (GLsizei, GLuint*);
typedef void (* glRenderbufferStorageOES_t) (GLenum, GLenum, GLsizei, GLsizei);
typedef void (* glGetRenderbufferParameterivOES_t) (GLenum, GLenum, GLint*);
typedef GLboolean (* glIsFramebufferOES_t) (GLuint);
typedef void (* glBindFramebufferOES_t) (GLenum, GLuint);
typedef void (* glDeleteFramebuffersOES_t) (GLsizei, const GLuint*);
typedef void (* glGenFramebuffersOES_t) (GLsizei, GLuint*);
typedef GLenum (* glCheckFramebufferStatusOES_t) (GLenum);
typedef void (* glFramebufferRenderbufferOES_t) (GLenum, GLenum, GLenum, GLuint);
typedef void (* glFramebufferTexture2DOES_t) (GLenum, GLenum, GLenum, GLuint, GLint);
typedef void (* glGetFramebufferAttachmentParameterivOES_t) (GLenum, GLenum, GLenum, GLint*);
typedef void (* glGenerateMipmapOES_t) (GLenum);
typedef void* (* glMapBufferOES_t) (GLenum, GLenum);
typedef GLboolean (* glUnmapBufferOES_t) (GLenum);
typedef void (* glGetBufferPointervOES_t) (GLenum, GLenum, GLvoid*);
typedef void (* glCurrentPaletteMatrixOES_t) (GLuint);
typedef void (* glLoadPaletteFromModelViewMatrixOES_t) ();
typedef void (* glMatrixIndexPointerOES_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (* glWeightPointerOES_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef GLbitfield (* glQueryMatrixxOES_t) (GLfixed, GLint);
typedef void (* glDepthRangefOES_t) (GLclampf, GLclampf);
typedef void (* glFrustumfOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glOrthofOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (* glClipPlanefOES_t) (GLenum, const GLfloat*);
typedef void (* glGetClipPlanefOES_t) (GLenum, GLfloat);
typedef void (* glClearDepthfOES_t) (GLclampf);
typedef void (* glTexGenfOES_t) (GLenum, GLenum, GLfloat);
typedef void (* glTexGenfvOES_t) (GLenum, GLenum, const GLfloat*);
typedef void (* glTexGeniOES_t) (GLenum, GLenum, GLint);
typedef void (* glTexGenivOES_t) (GLenum, GLenum, const GLint*);
typedef void (* glTexGenxOES_t) (GLenum, GLenum, GLfixed);
typedef void (* glTexGenxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (* glGetTexGenfvOES_t) (GLenum, GLenum, GLfloat*);
typedef void (* glGetTexGenivOES_t) (GLenum, GLenum, GLint*);
typedef void (* glGetTexGenxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (* glBindVertexArrayOES_t) (GLuint);
typedef void (* glDeleteVertexArraysOES_t) (GLsizei, const GLuint*);
typedef void (* glGenVertexArraysOES_t) (GLsizei, GLuint*);
typedef GLboolean (* glIsVertexArrayOES_t) (GLuint);
typedef void (* glDiscardFramebufferEXT_t) (GLenum, GLsizei, const GLenum*);
typedef void (* glMultiDrawArraysEXT_t) (GLenum, GLint*, GLsizei*, GLsizei);
typedef void (* glMultiDrawElementsEXT_t) (GLenum, const GLsizei*, GLenum, const GLvoid**, GLsizei);
typedef void (* glClipPlanefIMG_t) (GLenum, const GLfloat*);
typedef void (* glClipPlanexIMG_t) (GLenum, const GLfixed*);
typedef void (* glRenderbufferStorageMultisampleIMG_t) (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
typedef void (* glFramebufferTexture2DMultisampleIMG_t) (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
typedef void (* glDeleteFencesNV_t) (GLsizei, const GLuint*);
typedef void (* glGenFencesNV_t) (GLsizei, GLuint*);
typedef GLboolean (* glIsFenceNV_t) (GLuint);
typedef GLboolean (* glTestFenceNV_t) (GLuint);
typedef void (* glGetFenceivNV_t) (GLuint, GLenum, GLint*);
typedef void (* glFinishFenceNV_t) (GLuint);
typedef void (* glSetFenceNV_t) (GLuint, GLenum);
typedef void (* glGetDriverControlsQCOM_t) (GLint*, GLsizei, GLuint*);
typedef void (* glGetDriverControlStringQCOM_t) (GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (* glEnableDriverControlQCOM_t) (GLuint);
typedef void (* glDisableDriverControlQCOM_t) (GLuint);
typedef void (* glExtGetTexturesQCOM_t) (GLuint*, GLint, GLint*);
typedef void (* glExtGetBuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (* glExtGetRenderbuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (* glExtGetFramebuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (* glExtGetTexLevelParameterivQCOM_t) (GLuint, GLenum, GLint, GLenum, GLint*);
typedef void (* glExtTexObjectStateOverrideiQCOM_t) (GLenum, GLenum, GLint);
typedef void (* glExtGetTexSubImageQCOM_t) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (* glExtGetBufferPointervQCOM_t) (GLenum, GLvoid*);
typedef void (* glExtGetShadersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (* glExtGetProgramsQCOM_t) (GLuint*, GLint, GLint*);
typedef GLboolean (* glExtIsProgramBinaryQCOM_t) (GLuint);
typedef void (* glExtGetProgramBinarySourceQCOM_t) (GLuint, GLenum, GLchar*, GLint*);
typedef void (* glStartTilingQCOM_t) (GLuint, GLuint, GLuint, GLuint, GLbitfield);
typedef void (* glEndTilingQCOM_t) (GLbitfield);
typedef void (GL_APIENTRY *glAlphaFunc_t) (GLenum, GLclampf);
typedef void (GL_APIENTRY *glClearColor_t) (GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (GL_APIENTRY *glClearDepthf_t) (GLclampf);
typedef void (GL_APIENTRY *glClipPlanef_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glColor4f_t) (GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glDepthRangef_t) (GLclampf, GLclampf);
typedef void (GL_APIENTRY *glFogf_t) (GLenum, GLfloat);
typedef void (GL_APIENTRY *glFogfv_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glFrustumf_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glGetClipPlanef_t) (GLenum, GLfloat);
typedef void (GL_APIENTRY *glGetFloatv_t) (GLenum, GLfloat*);
typedef void (GL_APIENTRY *glGetLightfv_t) (GLenum, GLenum, GLfloat*);
typedef void (GL_APIENTRY *glGetMaterialfv_t) (GLenum, GLenum, GLfloat*);
typedef void (GL_APIENTRY *glGetTexEnvfv_t) (GLenum, GLenum, GLfloat*);
typedef void (GL_APIENTRY *glGetTexParameterfv_t) (GLenum, GLenum, GLfloat*);
typedef void (GL_APIENTRY *glLightModelf_t) (GLenum, GLfloat);
typedef void (GL_APIENTRY *glLightModelfv_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glLightf_t) (GLenum, GLenum, GLfloat);
typedef void (GL_APIENTRY *glLightfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glLineWidth_t) (GLfloat);
typedef void (GL_APIENTRY *glLoadMatrixf_t) (const GLfloat*);
typedef void (GL_APIENTRY *glMaterialf_t) (GLenum, GLenum, GLfloat);
typedef void (GL_APIENTRY *glMaterialfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glMultMatrixf_t) (const GLfloat*);
typedef void (GL_APIENTRY *glMultiTexCoord4f_t) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glNormal3f_t) (GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glOrthof_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glPointParameterf_t) (GLenum, GLfloat);
typedef void (GL_APIENTRY *glPointParameterfv_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glPointSize_t) (GLfloat);
typedef void (GL_APIENTRY *glPolygonOffset_t) (GLfloat, GLfloat);
typedef void (GL_APIENTRY *glRotatef_t) (GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glScalef_t) (GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glTexEnvf_t) (GLenum, GLenum, GLfloat);
typedef void (GL_APIENTRY *glTexEnvfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glTexParameterf_t) (GLenum, GLenum, GLfloat);
typedef void (GL_APIENTRY *glTexParameterfv_t) (GLenum, GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glTranslatef_t) (GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glActiveTexture_t) (GLenum);
typedef void (GL_APIENTRY *glAlphaFuncx_t) (GLenum, GLclampx);
typedef void (GL_APIENTRY *glBindBuffer_t) (GLenum, GLuint);
typedef void (GL_APIENTRY *glBindTexture_t) (GLenum, GLuint);
typedef void (GL_APIENTRY *glBlendFunc_t) (GLenum, GLenum);
typedef void (GL_APIENTRY *glBufferData_t) (GLenum, GLsizeiptr, const GLvoid*, GLenum);
typedef void (GL_APIENTRY *glBufferSubData_t) (GLenum, GLintptr, GLsizeiptr, const GLvoid*);
typedef void (GL_APIENTRY *glClear_t) (GLbitfield);
typedef void (GL_APIENTRY *glClearColorx_t) (GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (GL_APIENTRY *glClearDepthx_t) (GLclampx);
typedef void (GL_APIENTRY *glClearStencil_t) (GLint);
typedef void (GL_APIENTRY *glClientActiveTexture_t) (GLenum);
typedef void (GL_APIENTRY *glClipPlanex_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glColor4ub_t) (GLubyte, GLubyte, GLubyte, GLubyte);
typedef void (GL_APIENTRY *glColor4x_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glColorMask_t) (GLboolean, GLboolean, GLboolean, GLboolean);
typedef void (GL_APIENTRY *glColorPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glCompressedTexImage2D_t) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glCompressedTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glCopyTexImage2D_t) (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
typedef void (GL_APIENTRY *glCopyTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef void (GL_APIENTRY *glCullFace_t) (GLenum);
typedef void (GL_APIENTRY *glDeleteBuffers_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glDeleteTextures_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glDepthFunc_t) (GLenum);
typedef void (GL_APIENTRY *glDepthMask_t) (GLboolean);
typedef void (GL_APIENTRY *glDepthRangex_t) (GLclampx, GLclampx);
typedef void (GL_APIENTRY *glDisable_t) (GLenum);
typedef void (GL_APIENTRY *glDisableClientState_t) (GLenum);
typedef void (GL_APIENTRY *glDrawArrays_t) (GLenum, GLint, GLsizei);
typedef void (GL_APIENTRY *glDrawElements_t) (GLenum, GLsizei, GLenum, const GLvoid*);
typedef void (GL_APIENTRY *glEnable_t) (GLenum);
typedef void (GL_APIENTRY *glEnableClientState_t) (GLenum);
typedef void (GL_APIENTRY *glFinish_t) ();
typedef void (GL_APIENTRY *glFlush_t) ();
typedef void (GL_APIENTRY *glFogx_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glFogxv_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glFrontFace_t) (GLenum);
typedef void (GL_APIENTRY *glFrustumx_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glGetBooleanv_t) (GLenum, GLboolean*);
typedef void (GL_APIENTRY *glGetBufferParameteriv_t) (GLenum, GLenum, GLint*);
typedef void (GL_APIENTRY *glGetClipPlanex_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glGenBuffers_t) (GLsizei, GLuint*);
typedef void (GL_APIENTRY *glGenTextures_t) (GLsizei, GLuint*);
typedef GLenum (GL_APIENTRY *glGetError_t) ();
typedef void (GL_APIENTRY *glGetFixedv_t) (GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetIntegerv_t) (GLenum, GLint*);
typedef void (GL_APIENTRY *glGetLightxv_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetMaterialxv_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetPointerv_t) (GLenum, GLvoid*);
typedef const GLubyte* (GL_APIENTRY *glGetString_t) (GLenum);
typedef void (GL_APIENTRY *glGetTexEnviv_t) (GLenum, GLenum, GLint*);
typedef void (GL_APIENTRY *glGetTexEnvxv_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetTexParameteriv_t) (GLenum, GLenum, GLint*);
typedef void (GL_APIENTRY *glGetTexParameterxv_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glHint_t) (GLenum, GLenum);
typedef GLboolean (GL_APIENTRY *glIsBuffer_t) (GLuint);
typedef GLboolean (GL_APIENTRY *glIsEnabled_t) (GLenum);
typedef GLboolean (GL_APIENTRY *glIsTexture_t) (GLuint);
typedef void (GL_APIENTRY *glLightModelx_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glLightModelxv_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glLightx_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glLightxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glLineWidthx_t) (GLfixed);
typedef void (GL_APIENTRY *glLoadIdentity_t) ();
typedef void (GL_APIENTRY *glLoadMatrixx_t) (const GLfixed*);
typedef void (GL_APIENTRY *glLogicOp_t) (GLenum);
typedef void (GL_APIENTRY *glMaterialx_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glMaterialxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glMatrixMode_t) (GLenum);
typedef void (GL_APIENTRY *glMultMatrixx_t) (const GLfixed*);
typedef void (GL_APIENTRY *glMultiTexCoord4x_t) (GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glNormal3x_t) (GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glNormalPointer_t) (GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glOrthox_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glPixelStorei_t) (GLenum, GLint);
typedef void (GL_APIENTRY *glPointParameterx_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glPointParameterxv_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glPointSizex_t) (GLfixed);
typedef void (GL_APIENTRY *glPolygonOffsetx_t) (GLfixed, GLfixed);
typedef void (GL_APIENTRY *glPopMatrix_t) ();
typedef void (GL_APIENTRY *glPushMatrix_t) ();
typedef void (GL_APIENTRY *glReadPixels_t) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (GL_APIENTRY *glRotatex_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glSampleCoverage_t) (GLclampf, GLboolean);
typedef void (GL_APIENTRY *glSampleCoveragex_t) (GLclampx, GLboolean);
typedef void (GL_APIENTRY *glScalex_t) (GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glScissor_t) (GLint, GLint, GLsizei, GLsizei);
typedef void (GL_APIENTRY *glShadeModel_t) (GLenum);
typedef void (GL_APIENTRY *glStencilFunc_t) (GLenum, GLint, GLuint);
typedef void (GL_APIENTRY *glStencilMask_t) (GLuint);
typedef void (GL_APIENTRY *glStencilOp_t) (GLenum, GLenum, GLenum);
typedef void (GL_APIENTRY *glTexCoordPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glTexEnvi_t) (GLenum, GLenum, GLint);
typedef void (GL_APIENTRY *glTexEnvx_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glTexEnviv_t) (GLenum, GLenum, const GLint*);
typedef void (GL_APIENTRY *glTexEnvxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glTexImage2D_t) (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
typedef void (GL_APIENTRY *glTexParameteri_t) (GLenum, GLenum, GLint);
typedef void (GL_APIENTRY *glTexParameterx_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glTexParameteriv_t) (GLenum, GLenum, const GLint*);
typedef void (GL_APIENTRY *glTexParameterxv_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glTexSubImage2D_t) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*);
typedef void (GL_APIENTRY *glTranslatex_t) (GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glVertexPointer_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glViewport_t) (GLint, GLint, GLsizei, GLsizei);
typedef void (GL_APIENTRY *glPointSizePointerOES_t) (GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glBlendEquationSeparateOES_t) (GLenum, GLenum);
typedef void (GL_APIENTRY *glBlendFuncSeparateOES_t) (GLenum, GLenum, GLenum, GLenum);
typedef void (GL_APIENTRY *glBlendEquationOES_t) (GLenum);
typedef void (GL_APIENTRY *glDrawTexsOES_t) (GLshort, GLshort, GLshort, GLshort, GLshort);
typedef void (GL_APIENTRY *glDrawTexiOES_t) (GLint, GLint, GLint, GLint, GLint);
typedef void (GL_APIENTRY *glDrawTexxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glDrawTexsvOES_t) (const GLshort*);
typedef void (GL_APIENTRY *glDrawTexivOES_t) (const GLint*);
typedef void (GL_APIENTRY *glDrawTexxvOES_t) (const GLfixed*);
typedef void (GL_APIENTRY *glDrawTexfOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glDrawTexfvOES_t) (const GLfloat*);
typedef void (GL_APIENTRY *glEGLImageTargetTexture2DOES_t) (GLenum, GLeglImageOES);
typedef void (GL_APIENTRY *glEGLImageTargetRenderbufferStorageOES_t) (GLenum, GLeglImageOES);
typedef void (GL_APIENTRY *glAlphaFuncxOES_t) (GLenum, GLclampx);
typedef void (GL_APIENTRY *glClearColorxOES_t) (GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (GL_APIENTRY *glClearDepthxOES_t) (GLclampx);
typedef void (GL_APIENTRY *glClipPlanexOES_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glColor4xOES_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glDepthRangexOES_t) (GLclampx, GLclampx);
typedef void (GL_APIENTRY *glFogxOES_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glFogxvOES_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glFrustumxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glGetClipPlanexOES_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glGetFixedvOES_t) (GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetLightxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetMaterialxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetTexEnvxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glGetTexParameterxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glLightModelxOES_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glLightModelxvOES_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glLightxOES_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glLightxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glLineWidthxOES_t) (GLfixed);
typedef void (GL_APIENTRY *glLoadMatrixxOES_t) (const GLfixed*);
typedef void (GL_APIENTRY *glMaterialxOES_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glMaterialxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glMultMatrixxOES_t) (const GLfixed*);
typedef void (GL_APIENTRY *glMultiTexCoord4xOES_t) (GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glNormal3xOES_t) (GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glOrthoxOES_t) (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glPointParameterxOES_t) (GLenum, GLfixed);
typedef void (GL_APIENTRY *glPointParameterxvOES_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glPointSizexOES_t) (GLfixed);
typedef void (GL_APIENTRY *glPolygonOffsetxOES_t) (GLfixed, GLfixed);
typedef void (GL_APIENTRY *glRotatexOES_t) (GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glSampleCoveragexOES_t) (GLclampx, GLboolean);
typedef void (GL_APIENTRY *glScalexOES_t) (GLfixed, GLfixed, GLfixed);
typedef void (GL_APIENTRY *glTexEnvxOES_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glTexEnvxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glTexParameterxOES_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glTexParameterxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glTranslatexOES_t) (GLfixed, GLfixed, GLfixed);
typedef GLboolean (GL_APIENTRY *glIsRenderbufferOES_t) (GLuint);
typedef void (GL_APIENTRY *glBindRenderbufferOES_t) (GLenum, GLuint);
typedef void (GL_APIENTRY *glDeleteRenderbuffersOES_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glGenRenderbuffersOES_t) (GLsizei, GLuint*);
typedef void (GL_APIENTRY *glRenderbufferStorageOES_t) (GLenum, GLenum, GLsizei, GLsizei);
typedef void (GL_APIENTRY *glGetRenderbufferParameterivOES_t) (GLenum, GLenum, GLint*);
typedef GLboolean (GL_APIENTRY *glIsFramebufferOES_t) (GLuint);
typedef void (GL_APIENTRY *glBindFramebufferOES_t) (GLenum, GLuint);
typedef void (GL_APIENTRY *glDeleteFramebuffersOES_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glGenFramebuffersOES_t) (GLsizei, GLuint*);
typedef GLenum (GL_APIENTRY *glCheckFramebufferStatusOES_t) (GLenum);
typedef void (GL_APIENTRY *glFramebufferRenderbufferOES_t) (GLenum, GLenum, GLenum, GLuint);
typedef void (GL_APIENTRY *glFramebufferTexture2DOES_t) (GLenum, GLenum, GLenum, GLuint, GLint);
typedef void (GL_APIENTRY *glGetFramebufferAttachmentParameterivOES_t) (GLenum, GLenum, GLenum, GLint*);
typedef void (GL_APIENTRY *glGenerateMipmapOES_t) (GLenum);
typedef void* (GL_APIENTRY *glMapBufferOES_t) (GLenum, GLenum);
typedef GLboolean (GL_APIENTRY *glUnmapBufferOES_t) (GLenum);
typedef void (GL_APIENTRY *glGetBufferPointervOES_t) (GLenum, GLenum, GLvoid*);
typedef void (GL_APIENTRY *glCurrentPaletteMatrixOES_t) (GLuint);
typedef void (GL_APIENTRY *glLoadPaletteFromModelViewMatrixOES_t) ();
typedef void (GL_APIENTRY *glMatrixIndexPointerOES_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef void (GL_APIENTRY *glWeightPointerOES_t) (GLint, GLenum, GLsizei, const GLvoid*);
typedef GLbitfield (GL_APIENTRY *glQueryMatrixxOES_t) (GLfixed, GLint);
typedef void (GL_APIENTRY *glDepthRangefOES_t) (GLclampf, GLclampf);
typedef void (GL_APIENTRY *glFrustumfOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glOrthofOES_t) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (GL_APIENTRY *glClipPlanefOES_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glGetClipPlanefOES_t) (GLenum, GLfloat);
typedef void (GL_APIENTRY *glClearDepthfOES_t) (GLclampf);
typedef void (GL_APIENTRY *glTexGenfOES_t) (GLenum, GLenum, GLfloat);
typedef void (GL_APIENTRY *glTexGenfvOES_t) (GLenum, GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glTexGeniOES_t) (GLenum, GLenum, GLint);
typedef void (GL_APIENTRY *glTexGenivOES_t) (GLenum, GLenum, const GLint*);
typedef void (GL_APIENTRY *glTexGenxOES_t) (GLenum, GLenum, GLfixed);
typedef void (GL_APIENTRY *glTexGenxvOES_t) (GLenum, GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glGetTexGenfvOES_t) (GLenum, GLenum, GLfloat*);
typedef void (GL_APIENTRY *glGetTexGenivOES_t) (GLenum, GLenum, GLint*);
typedef void (GL_APIENTRY *glGetTexGenxvOES_t) (GLenum, GLenum, GLfixed*);
typedef void (GL_APIENTRY *glBindVertexArrayOES_t) (GLuint);
typedef void (GL_APIENTRY *glDeleteVertexArraysOES_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glGenVertexArraysOES_t) (GLsizei, GLuint*);
typedef GLboolean (GL_APIENTRY *glIsVertexArrayOES_t) (GLuint);
typedef void (GL_APIENTRY *glDiscardFramebufferEXT_t) (GLenum, GLsizei, const GLenum*);
typedef void (GL_APIENTRY *glMultiDrawArraysEXT_t) (GLenum, GLint*, GLsizei*, GLsizei);
typedef void (GL_APIENTRY *glMultiDrawElementsEXT_t) (GLenum, const GLsizei*, GLenum, const GLvoid**, GLsizei);
typedef void (GL_APIENTRY *glClipPlanefIMG_t) (GLenum, const GLfloat*);
typedef void (GL_APIENTRY *glClipPlanexIMG_t) (GLenum, const GLfixed*);
typedef void (GL_APIENTRY *glRenderbufferStorageMultisampleIMG_t) (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
typedef void (GL_APIENTRY *glFramebufferTexture2DMultisampleIMG_t) (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
typedef void (GL_APIENTRY *glDeleteFencesNV_t) (GLsizei, const GLuint*);
typedef void (GL_APIENTRY *glGenFencesNV_t) (GLsizei, GLuint*);
typedef GLboolean (GL_APIENTRY *glIsFenceNV_t) (GLuint);
typedef GLboolean (GL_APIENTRY *glTestFenceNV_t) (GLuint);
typedef void (GL_APIENTRY *glGetFenceivNV_t) (GLuint, GLenum, GLint*);
typedef void (GL_APIENTRY *glFinishFenceNV_t) (GLuint);
typedef void (GL_APIENTRY *glSetFenceNV_t) (GLuint, GLenum);
typedef void (GL_APIENTRY *glGetDriverControlsQCOM_t) (GLint*, GLsizei, GLuint*);
typedef void (GL_APIENTRY *glGetDriverControlStringQCOM_t) (GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (GL_APIENTRY *glEnableDriverControlQCOM_t) (GLuint);
typedef void (GL_APIENTRY *glDisableDriverControlQCOM_t) (GLuint);
typedef void (GL_APIENTRY *glExtGetTexturesQCOM_t) (GLuint*, GLint, GLint*);
typedef void (GL_APIENTRY *glExtGetBuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (GL_APIENTRY *glExtGetRenderbuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (GL_APIENTRY *glExtGetFramebuffersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (GL_APIENTRY *glExtGetTexLevelParameterivQCOM_t) (GLuint, GLenum, GLint, GLenum, GLint*);
typedef void (GL_APIENTRY *glExtTexObjectStateOverrideiQCOM_t) (GLenum, GLenum, GLint);
typedef void (GL_APIENTRY *glExtGetTexSubImageQCOM_t) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (GL_APIENTRY *glExtGetBufferPointervQCOM_t) (GLenum, GLvoid*);
typedef void (GL_APIENTRY *glExtGetShadersQCOM_t) (GLuint*, GLint, GLint*);
typedef void (GL_APIENTRY *glExtGetProgramsQCOM_t) (GLuint*, GLint, GLint*);
typedef GLboolean (GL_APIENTRY *glExtIsProgramBinaryQCOM_t) (GLuint);
typedef void (GL_APIENTRY *glExtGetProgramBinarySourceQCOM_t) (GLuint, GLenum, GLchar*, GLint*);
typedef void (GL_APIENTRY *glStartTilingQCOM_t) (GLuint, GLuint, GLuint, GLuint, GLbitfield);
typedef void (GL_APIENTRY *glEndTilingQCOM_t) (GLbitfield);
#endif

View File

@@ -50,17 +50,23 @@ int ApiGen::genProcTypes(const std::string &filename, SideType side)
}
printHeader(fp);
fprintf(fp, "#ifndef __%s_%s_proc_t_h\n", m_basename.c_str(), sideString(side));
fprintf(fp, "#define __%s_%s_proc_t_h\n", m_basename.c_str(), sideString(side));
const char* basename = m_basename.c_str();
fprintf(fp, "#ifndef __%s_%s_proc_t_h\n", basename, sideString(side));
fprintf(fp, "#define __%s_%s_proc_t_h\n", basename, sideString(side));
fprintf(fp, "\n\n");
fprintf(fp, "\n#include \"%s_types.h\"\n", m_basename.c_str());
fprintf(fp, "\n#include \"%s_types.h\"\n",basename);
fprintf(fp, "#ifndef %s_APIENTRY\n",basename);
fprintf(fp, "#define %s_APIENTRY \n",basename);
fprintf(fp, "#endif\n");
for (size_t i = 0; i < size(); i++) {
EntryPoint *e = &at(i);
fprintf(fp, "typedef ");
e->retval().printType(fp);
fprintf(fp, " (* %s_%s_proc_t) (", e->name().c_str(), sideString(side));
fprintf(fp, " (%s_APIENTRY *%s_%s_proc_t) (", basename, e->name().c_str(), sideString(side));
if (side == CLIENT_SIDE) { fprintf(fp, "void * ctx"); }
if (e->customDecoder() && side == SERVER_SIDE) { fprintf(fp, "void *ctx"); }

View File

@@ -17,6 +17,15 @@
#define __GL_BASE_TYPES__H
#include <KHR/khrplatform.h>
#ifndef gl_APIENTRY
#define gl_APIENTRY KHRONOS_APIENTRY
#endif
#ifndef gl2_APIENTRY
#define gl2_APIENTRY KHRONOS_APIENTRY
#endif
typedef void GLvoid;
typedef unsigned int GLenum;
typedef unsigned char GLboolean;