aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/cglext.cfg13
-rwxr-xr-xmake/gl-es1.cfg148
-rwxr-xr-xmake/gl-es2.cfg145
-rw-r--r--make/gl-gl2.cfg42
-rwxr-xr-xmake/gl-headers.cfg47
-rwxr-xr-xmake/glxext.cfg18
-rw-r--r--make/wglext.cfg20
7 files changed, 346 insertions, 87 deletions
diff --git a/make/cglext.cfg b/make/cglext.cfg
index f5ca85ae5..f6071c30b 100755
--- a/make/cglext.cfg
+++ b/make/cglext.cfg
@@ -21,17 +21,8 @@ GetProcAddressTableExpr _context.getCGLExtProcAddressTable()
# Ignore everything that doesn't start with cgl or CGL
IgnoreNot ^(cgl|CGL).+
-CustomCCode #include <inttypes.h>
-CustomCCode #include <stdlib.h>
-
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-
-CustomCCode #include </usr/include/machine/types.h>
+Include gl-headers.cfg
+Include intptr.cfg
CustomCCode /* Provide Windows typedefs */
CustomCCode typedef void* LPVOID;
diff --git a/make/gl-es1.cfg b/make/gl-es1.cfg
index 227e4bcb5..b18e4ea47 100755
--- a/make/gl-es1.cfg
+++ b/make/gl-es1.cfg
@@ -176,6 +176,154 @@ ForceProcAddressGen glVertexPointer
ForceProcAddressGen glViewport
ForceProcAddressGen glPointSizePointerOES
+# Also force the calling conventions of the locally generated function
+# pointer typedefs for these routines to GL_APIENTRY
+LocalProcAddressCallingConvention glAlphaFunc GL_APIENTRY
+LocalProcAddressCallingConvention glClearColor GL_APIENTRY
+LocalProcAddressCallingConvention glClearDepthf GL_APIENTRY
+LocalProcAddressCallingConvention glClipPlanef GL_APIENTRY
+LocalProcAddressCallingConvention glColor4f GL_APIENTRY
+LocalProcAddressCallingConvention glDepthRangef GL_APIENTRY
+LocalProcAddressCallingConvention glFogf GL_APIENTRY
+LocalProcAddressCallingConvention glFogfv GL_APIENTRY
+LocalProcAddressCallingConvention glFrustumf GL_APIENTRY
+LocalProcAddressCallingConvention glGetClipPlanef GL_APIENTRY
+LocalProcAddressCallingConvention glGetFloatv GL_APIENTRY
+LocalProcAddressCallingConvention glGetLightfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetMaterialfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexEnvfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexParameterfv GL_APIENTRY
+LocalProcAddressCallingConvention glLightModelf GL_APIENTRY
+LocalProcAddressCallingConvention glLightModelfv GL_APIENTRY
+LocalProcAddressCallingConvention glLightf GL_APIENTRY
+LocalProcAddressCallingConvention glLightfv GL_APIENTRY
+LocalProcAddressCallingConvention glLineWidth GL_APIENTRY
+LocalProcAddressCallingConvention glLoadMatrixf GL_APIENTRY
+LocalProcAddressCallingConvention glMaterialf GL_APIENTRY
+LocalProcAddressCallingConvention glMaterialfv GL_APIENTRY
+LocalProcAddressCallingConvention glMultMatrixf GL_APIENTRY
+LocalProcAddressCallingConvention glMultiTexCoord4f GL_APIENTRY
+LocalProcAddressCallingConvention glNormal3f GL_APIENTRY
+LocalProcAddressCallingConvention glOrthof GL_APIENTRY
+LocalProcAddressCallingConvention glPointParameterf GL_APIENTRY
+LocalProcAddressCallingConvention glPointParameterfv GL_APIENTRY
+LocalProcAddressCallingConvention glPointSize GL_APIENTRY
+LocalProcAddressCallingConvention glPolygonOffset GL_APIENTRY
+LocalProcAddressCallingConvention glRotatef GL_APIENTRY
+LocalProcAddressCallingConvention glScalef GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnvf GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnvfv GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterf GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterfv GL_APIENTRY
+LocalProcAddressCallingConvention glTranslatef GL_APIENTRY
+LocalProcAddressCallingConvention glActiveTexture GL_APIENTRY
+LocalProcAddressCallingConvention glAlphaFuncx GL_APIENTRY
+LocalProcAddressCallingConvention glBindBuffer GL_APIENTRY
+LocalProcAddressCallingConvention glBindTexture GL_APIENTRY
+LocalProcAddressCallingConvention glBlendFunc GL_APIENTRY
+LocalProcAddressCallingConvention glBufferData GL_APIENTRY
+LocalProcAddressCallingConvention glBufferSubData GL_APIENTRY
+LocalProcAddressCallingConvention glClear GL_APIENTRY
+LocalProcAddressCallingConvention glClearColorx GL_APIENTRY
+LocalProcAddressCallingConvention glClearDepthx GL_APIENTRY
+LocalProcAddressCallingConvention glClearStencil GL_APIENTRY
+LocalProcAddressCallingConvention glClientActiveTexture GL_APIENTRY
+LocalProcAddressCallingConvention glClipPlanex GL_APIENTRY
+LocalProcAddressCallingConvention glColor4ub GL_APIENTRY
+LocalProcAddressCallingConvention glColor4x GL_APIENTRY
+LocalProcAddressCallingConvention glColorMask GL_APIENTRY
+LocalProcAddressCallingConvention glColorPointer GL_APIENTRY
+LocalProcAddressCallingConvention glCompressedTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCompressedTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCopyTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCopyTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCullFace GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteBuffers GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteTextures GL_APIENTRY
+LocalProcAddressCallingConvention glDepthFunc GL_APIENTRY
+LocalProcAddressCallingConvention glDepthMask GL_APIENTRY
+LocalProcAddressCallingConvention glDepthRangex GL_APIENTRY
+LocalProcAddressCallingConvention glDisable GL_APIENTRY
+LocalProcAddressCallingConvention glDisableClientState GL_APIENTRY
+LocalProcAddressCallingConvention glDrawArrays GL_APIENTRY
+LocalProcAddressCallingConvention glDrawElements GL_APIENTRY
+LocalProcAddressCallingConvention glEnable GL_APIENTRY
+LocalProcAddressCallingConvention glEnableClientState GL_APIENTRY
+LocalProcAddressCallingConvention glFinish GL_APIENTRY
+LocalProcAddressCallingConvention glFlush GL_APIENTRY
+LocalProcAddressCallingConvention glFogx GL_APIENTRY
+LocalProcAddressCallingConvention glFogxv GL_APIENTRY
+LocalProcAddressCallingConvention glFrontFace GL_APIENTRY
+LocalProcAddressCallingConvention glFrustumx GL_APIENTRY
+LocalProcAddressCallingConvention glGetBooleanv GL_APIENTRY
+LocalProcAddressCallingConvention glGetBufferParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetClipPlanex GL_APIENTRY
+LocalProcAddressCallingConvention glGenBuffers GL_APIENTRY
+LocalProcAddressCallingConvention glGenTextures GL_APIENTRY
+LocalProcAddressCallingConvention glGetError GL_APIENTRY
+LocalProcAddressCallingConvention glGetFixedv GL_APIENTRY
+LocalProcAddressCallingConvention glGetIntegerv GL_APIENTRY
+LocalProcAddressCallingConvention glGetLightxv GL_APIENTRY
+LocalProcAddressCallingConvention glGetMaterialxv GL_APIENTRY
+LocalProcAddressCallingConvention glGetPointerv GL_APIENTRY
+LocalProcAddressCallingConvention glGetString GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexEnviv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexEnvxv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexParameterxv GL_APIENTRY
+LocalProcAddressCallingConvention glHint GL_APIENTRY
+LocalProcAddressCallingConvention glIsBuffer GL_APIENTRY
+LocalProcAddressCallingConvention glIsEnabled GL_APIENTRY
+LocalProcAddressCallingConvention glIsTexture GL_APIENTRY
+LocalProcAddressCallingConvention glLightModelx GL_APIENTRY
+LocalProcAddressCallingConvention glLightModelxv GL_APIENTRY
+LocalProcAddressCallingConvention glLightx GL_APIENTRY
+LocalProcAddressCallingConvention glLightxv GL_APIENTRY
+LocalProcAddressCallingConvention glLineWidthx GL_APIENTRY
+LocalProcAddressCallingConvention glLoadIdentity GL_APIENTRY
+LocalProcAddressCallingConvention glLoadMatrixx GL_APIENTRY
+LocalProcAddressCallingConvention glLogicOp GL_APIENTRY
+LocalProcAddressCallingConvention glMaterialx GL_APIENTRY
+LocalProcAddressCallingConvention glMaterialxv GL_APIENTRY
+LocalProcAddressCallingConvention glMatrixMode GL_APIENTRY
+LocalProcAddressCallingConvention glMultMatrixx GL_APIENTRY
+LocalProcAddressCallingConvention glMultiTexCoord4x GL_APIENTRY
+LocalProcAddressCallingConvention glNormal3x GL_APIENTRY
+LocalProcAddressCallingConvention glNormalPointer GL_APIENTRY
+LocalProcAddressCallingConvention glOrthox GL_APIENTRY
+LocalProcAddressCallingConvention glPixelStorei GL_APIENTRY
+LocalProcAddressCallingConvention glPointParameterx GL_APIENTRY
+LocalProcAddressCallingConvention glPointParameterxv GL_APIENTRY
+LocalProcAddressCallingConvention glPointSizex GL_APIENTRY
+LocalProcAddressCallingConvention glPolygonOffsetx GL_APIENTRY
+LocalProcAddressCallingConvention glPopMatrix GL_APIENTRY
+LocalProcAddressCallingConvention glPushMatrix GL_APIENTRY
+LocalProcAddressCallingConvention glReadPixels GL_APIENTRY
+LocalProcAddressCallingConvention glRotatex GL_APIENTRY
+LocalProcAddressCallingConvention glSampleCoverage GL_APIENTRY
+LocalProcAddressCallingConvention glSampleCoveragex GL_APIENTRY
+LocalProcAddressCallingConvention glScalex GL_APIENTRY
+LocalProcAddressCallingConvention glScissor GL_APIENTRY
+LocalProcAddressCallingConvention glShadeModel GL_APIENTRY
+LocalProcAddressCallingConvention glStencilFunc GL_APIENTRY
+LocalProcAddressCallingConvention glStencilMask GL_APIENTRY
+LocalProcAddressCallingConvention glStencilOp GL_APIENTRY
+LocalProcAddressCallingConvention glTexCoordPointer GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnvi GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnvx GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnviv GL_APIENTRY
+LocalProcAddressCallingConvention glTexEnvxv GL_APIENTRY
+LocalProcAddressCallingConvention glTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameteri GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterx GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterxv GL_APIENTRY
+LocalProcAddressCallingConvention glTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glTranslatex GL_APIENTRY
+LocalProcAddressCallingConvention glVertexPointer GL_APIENTRY
+LocalProcAddressCallingConvention glViewport GL_APIENTRY
+LocalProcAddressCallingConvention glPointSizePointerOES GL_APIENTRY
+
# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true
diff --git a/make/gl-es2.cfg b/make/gl-es2.cfg
index 74620253f..2fc3e7919 100755
--- a/make/gl-es2.cfg
+++ b/make/gl-es2.cfg
@@ -171,6 +171,151 @@ ForceProcAddressGen glVertexAttrib4fv
ForceProcAddressGen glVertexAttribPointer
ForceProcAddressGen glViewport
+# Also force the calling conventions of the locally generated function
+# pointer typedefs for these routines to GL_APIENTRY
+LocalProcAddressCallingConvention glActiveTexture GL_APIENTRY
+LocalProcAddressCallingConvention glAttachShader GL_APIENTRY
+LocalProcAddressCallingConvention glBindAttribLocation GL_APIENTRY
+LocalProcAddressCallingConvention glBindBuffer GL_APIENTRY
+LocalProcAddressCallingConvention glBindFramebuffer GL_APIENTRY
+LocalProcAddressCallingConvention glBindRenderbuffer GL_APIENTRY
+LocalProcAddressCallingConvention glBindTexture GL_APIENTRY
+LocalProcAddressCallingConvention glBlendColor GL_APIENTRY
+LocalProcAddressCallingConvention glBlendEquation GL_APIENTRY
+LocalProcAddressCallingConvention glBlendEquationSeparate GL_APIENTRY
+LocalProcAddressCallingConvention glBlendFunc GL_APIENTRY
+LocalProcAddressCallingConvention glBlendFuncSeparate GL_APIENTRY
+LocalProcAddressCallingConvention glBufferData GL_APIENTRY
+LocalProcAddressCallingConvention glBufferSubData GL_APIENTRY
+LocalProcAddressCallingConvention glCheckFramebufferStatus GL_APIENTRY
+LocalProcAddressCallingConvention glClear GL_APIENTRY
+LocalProcAddressCallingConvention glClearColor GL_APIENTRY
+LocalProcAddressCallingConvention glClearDepthf GL_APIENTRY
+LocalProcAddressCallingConvention glClearStencil GL_APIENTRY
+LocalProcAddressCallingConvention glColorMask GL_APIENTRY
+LocalProcAddressCallingConvention glCompileShader GL_APIENTRY
+LocalProcAddressCallingConvention glCompressedTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCompressedTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCopyTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCopyTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glCreateProgram GL_APIENTRY
+LocalProcAddressCallingConvention glCreateShader GL_APIENTRY
+LocalProcAddressCallingConvention glCullFace GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteBuffers GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteFramebuffers GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteTextures GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteProgram GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteRenderbuffers GL_APIENTRY
+LocalProcAddressCallingConvention glDeleteShader GL_APIENTRY
+LocalProcAddressCallingConvention glDetachShader GL_APIENTRY
+LocalProcAddressCallingConvention glDepthFunc GL_APIENTRY
+LocalProcAddressCallingConvention glDepthMask GL_APIENTRY
+LocalProcAddressCallingConvention glDepthRangef GL_APIENTRY
+LocalProcAddressCallingConvention glDisable GL_APIENTRY
+LocalProcAddressCallingConvention glDisableVertexAttribArray GL_APIENTRY
+LocalProcAddressCallingConvention glDrawArrays GL_APIENTRY
+LocalProcAddressCallingConvention glDrawElements GL_APIENTRY
+LocalProcAddressCallingConvention glEnable GL_APIENTRY
+LocalProcAddressCallingConvention glEnableVertexAttribArray GL_APIENTRY
+LocalProcAddressCallingConvention glFinish GL_APIENTRY
+LocalProcAddressCallingConvention glFlush GL_APIENTRY
+LocalProcAddressCallingConvention glFramebufferRenderbuffer GL_APIENTRY
+LocalProcAddressCallingConvention glFramebufferTexture2D GL_APIENTRY
+LocalProcAddressCallingConvention glFrontFace GL_APIENTRY
+LocalProcAddressCallingConvention glGenBuffers GL_APIENTRY
+LocalProcAddressCallingConvention glGenerateMipmap GL_APIENTRY
+LocalProcAddressCallingConvention glGenFramebuffers GL_APIENTRY
+LocalProcAddressCallingConvention glGenRenderbuffers GL_APIENTRY
+LocalProcAddressCallingConvention glGenTextures GL_APIENTRY
+LocalProcAddressCallingConvention glGetActiveAttrib GL_APIENTRY
+LocalProcAddressCallingConvention glGetActiveUniform GL_APIENTRY
+LocalProcAddressCallingConvention glGetAttachedShaders GL_APIENTRY
+LocalProcAddressCallingConvention glGetAttribLocation GL_APIENTRY
+LocalProcAddressCallingConvention glGetBooleanv GL_APIENTRY
+LocalProcAddressCallingConvention glGetBufferParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetError GL_APIENTRY
+LocalProcAddressCallingConvention glGetFloatv GL_APIENTRY
+LocalProcAddressCallingConvention glGetFramebufferAttachmentParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetIntegerv GL_APIENTRY
+LocalProcAddressCallingConvention glGetProgramiv GL_APIENTRY
+LocalProcAddressCallingConvention glGetProgramInfoLog GL_APIENTRY
+LocalProcAddressCallingConvention glGetRenderbufferParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetShaderiv GL_APIENTRY
+LocalProcAddressCallingConvention glGetShaderInfoLog GL_APIENTRY
+LocalProcAddressCallingConvention glGetShaderPrecisionFormat GL_APIENTRY
+LocalProcAddressCallingConvention glGetShaderSource GL_APIENTRY
+LocalProcAddressCallingConvention glGetString GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexParameterfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetTexParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glGetUniformfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetUniformiv GL_APIENTRY
+LocalProcAddressCallingConvention glGetUniformLocation GL_APIENTRY
+LocalProcAddressCallingConvention glGetVertexAttribfv GL_APIENTRY
+LocalProcAddressCallingConvention glGetVertexAttribiv GL_APIENTRY
+LocalProcAddressCallingConvention glGetVertexAttribPointerv GL_APIENTRY
+LocalProcAddressCallingConvention glHint GL_APIENTRY
+LocalProcAddressCallingConvention glIsBuffer GL_APIENTRY
+LocalProcAddressCallingConvention glIsEnabled GL_APIENTRY
+LocalProcAddressCallingConvention glIsFramebuffer GL_APIENTRY
+LocalProcAddressCallingConvention glIsProgram GL_APIENTRY
+LocalProcAddressCallingConvention glIsRenderbuffer GL_APIENTRY
+LocalProcAddressCallingConvention glIsShader GL_APIENTRY
+LocalProcAddressCallingConvention glIsTexture GL_APIENTRY
+LocalProcAddressCallingConvention glLineWidth GL_APIENTRY
+LocalProcAddressCallingConvention glLinkProgram GL_APIENTRY
+LocalProcAddressCallingConvention glPixelStorei GL_APIENTRY
+LocalProcAddressCallingConvention glPolygonOffset GL_APIENTRY
+LocalProcAddressCallingConvention glReadPixels GL_APIENTRY
+LocalProcAddressCallingConvention glReleaseShaderCompiler GL_APIENTRY
+LocalProcAddressCallingConvention glRenderbufferStorage GL_APIENTRY
+LocalProcAddressCallingConvention glSampleCoverage GL_APIENTRY
+LocalProcAddressCallingConvention glScissor GL_APIENTRY
+LocalProcAddressCallingConvention glShaderBinary GL_APIENTRY
+LocalProcAddressCallingConvention glShaderSource GL_APIENTRY
+LocalProcAddressCallingConvention glStencilFunc GL_APIENTRY
+LocalProcAddressCallingConvention glStencilFuncSeparate GL_APIENTRY
+LocalProcAddressCallingConvention glStencilMask GL_APIENTRY
+LocalProcAddressCallingConvention glStencilMaskSeparate GL_APIENTRY
+LocalProcAddressCallingConvention glStencilOp GL_APIENTRY
+LocalProcAddressCallingConvention glStencilOpSeparate GL_APIENTRY
+LocalProcAddressCallingConvention glTexImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterf GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameterfv GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameteri GL_APIENTRY
+LocalProcAddressCallingConvention glTexParameteriv GL_APIENTRY
+LocalProcAddressCallingConvention glTexSubImage2D GL_APIENTRY
+LocalProcAddressCallingConvention glUniform1f GL_APIENTRY
+LocalProcAddressCallingConvention glUniform1fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform1i GL_APIENTRY
+LocalProcAddressCallingConvention glUniform1iv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform2f GL_APIENTRY
+LocalProcAddressCallingConvention glUniform2fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform2i GL_APIENTRY
+LocalProcAddressCallingConvention glUniform2iv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform3f GL_APIENTRY
+LocalProcAddressCallingConvention glUniform3fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform3i GL_APIENTRY
+LocalProcAddressCallingConvention glUniform3iv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform4f GL_APIENTRY
+LocalProcAddressCallingConvention glUniform4fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniform4i GL_APIENTRY
+LocalProcAddressCallingConvention glUniform4iv GL_APIENTRY
+LocalProcAddressCallingConvention glUniformMatrix2fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniformMatrix3fv GL_APIENTRY
+LocalProcAddressCallingConvention glUniformMatrix4fv GL_APIENTRY
+LocalProcAddressCallingConvention glUseProgram GL_APIENTRY
+LocalProcAddressCallingConvention glValidateProgram GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib1f GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib1fv GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib2f GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib2fv GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib3f GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib3fv GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib4f GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttrib4fv GL_APIENTRY
+LocalProcAddressCallingConvention glVertexAttribPointer GL_APIENTRY
+LocalProcAddressCallingConvention glViewport GL_APIENTRY
+
# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true
diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg
index d7d0e736a..0c05b6114 100644
--- a/make/gl-gl2.cfg
+++ b/make/gl-gl2.cfg
@@ -42,46 +42,7 @@ CustomJavaCode GL2 public void glDepthRangef(float zNear, float zFar);
CustomJavaCode GL2Impl public void glDepthRangef(float zNear, float zFar) {
CustomJavaCode GL2Impl glDepthRange((double)zNear, (double)zFar); }
-CustomCCode #if defined(_WIN32)
-CustomCCode #define WIN32_LEAN_AND_MEAN
-CustomCCode #include <windows.h>
-CustomCCode #undef WIN32_LEAN_AND_MEAN
-CustomCCode #include <stdlib.h>
-CustomCCode #include <stddef.h>
-CustomCCode #include <malloc.h>
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-CustomCCode #elif defined(macosx)
-CustomCCode #include <inttypes.h>
-CustomCCode #include <stdlib.h>
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-CustomCCode #include </usr/include/machine/types.h>
-CustomCCode /* Provide Windows typedefs */
-CustomCCode typedef void* LPVOID;
-CustomCCode typedef unsigned int* PUINT;
-CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX)
-CustomCCode #include <inttypes.h>
-CustomCCode #include <stdlib.h>
-CustomCCode #include <X11/Xlib.h>
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glxext.h" are parsed. */
-CustomCCode #define GLX_GLXEXT_PROTOTYPES
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-CustomCCode #include <GL/glx.h>
-CustomCCode #include <GL/glxext.h>
-CustomCCode #endif
-
+Include gl-headers.cfg
Include intptr.cfg
IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-common.java
@@ -91,4 +52,3 @@ IncludeAs CustomCCode gl-impl-CustomCCode.c
Import javax.media.opengl.GLES1
Import javax.media.opengl.GLES2
Import javax.media.opengl.GL2
-
diff --git a/make/gl-headers.cfg b/make/gl-headers.cfg
new file mode 100755
index 000000000..fc7dd440d
--- /dev/null
+++ b/make/gl-headers.cfg
@@ -0,0 +1,47 @@
+CustomCCode #if defined(_WIN32)
+CustomCCode #define WIN32_LEAN_AND_MEAN
+CustomCCode #include <windows.h>
+CustomCCode #undef WIN32_LEAN_AND_MEAN
+CustomCCode #include <stdlib.h>
+CustomCCode #include <stddef.h>
+CustomCCode #include <malloc.h>
+CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode "glext.h" are parsed. */
+CustomCCode #define GL_GLEXT_PROTOTYPES
+CustomCCode /* Define WGL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode "wglext.h" are parsed. */
+CustomCCode #define WGL_GLEXT_PROTOTYPES
+CustomCCode /* Include the OpenGL headers */
+CustomCCode #include <GL/gl.h>
+CustomCCode #include <GL/wglext.h>
+CustomCCode #elif defined(macosx)
+CustomCCode #include <inttypes.h>
+CustomCCode #include <stdlib.h>
+CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode "glext.h" are parsed. */
+CustomCCode #define GL_GLEXT_PROTOTYPES
+CustomCCode /* Include the OpenGL headers */
+CustomCCode #include <GL/gl.h>
+CustomCCode #include </usr/include/machine/types.h>
+CustomCCode /* Provide Windows typedefs */
+CustomCCode typedef void* LPVOID;
+CustomCCode typedef unsigned int* PUINT;
+CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX)
+CustomCCode #include <inttypes.h>
+CustomCCode #include <stdlib.h>
+CustomCCode #include <X11/Xlib.h>
+CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode "glext.h" are parsed. */
+CustomCCode #define GL_GLEXT_PROTOTYPES
+CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode "glxext.h" are parsed. */
+CustomCCode #define GLX_GLXEXT_PROTOTYPES
+CustomCCode /* Include the OpenGL headers */
+CustomCCode #include <GL/gl.h>
+CustomCCode #include <GL/glx.h>
+CustomCCode #include <GL/glxext.h>
+CustomCCode #endif
+CustomCCode /* Provide GLES #define for locally generated function pointer typedefs */
+CustomCCode #ifndef GL_APIENTRY
+CustomCCode #define GL_APIENTRY GLAPIENTRY
+CustomCCode #endif
diff --git a/make/glxext.cfg b/make/glxext.cfg
index 6dd9e5c19..1c93a063c 100755
--- a/make/glxext.cfg
+++ b/make/glxext.cfg
@@ -20,22 +20,8 @@ Import com.sun.opengl.impl.x11.*
# Ignore everything that doesn't start with glX or GLX
IgnoreNot ^(glX|GLX).+
-CustomCCode #include <inttypes.h>
-CustomCCode #include <stdlib.h>
-CustomCCode #include <X11/Xlib.h>
-
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-
-CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glxext.h" are parsed. */
-CustomCCode #define GLX_GLXEXT_PROTOTYPES
-
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-CustomCCode #include <GL/glx.h>
-CustomCCode #include <GL/glxext.h>
+Include gl-headers.cfg
+Include intptr.cfg
CustomCCode /* Provide Windows typedefs */
CustomCCode typedef void* LPVOID;
diff --git a/make/wglext.cfg b/make/wglext.cfg
index f4a21ab03..2557a6d13 100644
--- a/make/wglext.cfg
+++ b/make/wglext.cfg
@@ -19,25 +19,7 @@ GetProcAddressTableExpr _context.getWGLExtProcAddressTable()
Ignore GL_.+
Ignore gl.+
-CustomCCode #define WIN32_LEAN_AND_MEAN
-CustomCCode #include <windows.h>
-CustomCCode #undef WIN32_LEAN_AND_MEAN
-CustomCCode #include <stdlib.h>
-CustomCCode #include <stddef.h>
-CustomCCode #include <malloc.h>
-
-CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "glext.h" are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
-
-CustomCCode /* Define WGL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
-CustomCCode "wglext.h" are parsed. */
-CustomCCode #define WGL_GLEXT_PROTOTYPES
-
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
-CustomCCode #include <GL/wglext.h>
-
+Include gl-headers.cfg
Include intptr.cfg
CustomJavaCode WGLExt public boolean isFunctionAvailable(String glFunctionName);