From 9df128e4eae30352d2ff440554ef067eef3ca793 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 6 Jul 2008 01:03:35 +0000 Subject: Fixed Windows-specific problem with locally generated function pointer typedefs where the calling convention was not specified. Provided new LocalProcAddressCallingConvention directive to allow developer to specify the calling convention on a per-function basis; used this in gl-es1.cfg and gl-es2.cfg. Changed GLEmitter to force the calling convention of the locally typedefed function pointers for OpenGL function name unification to GL_APIENTRY, compatible with OpenGL ES 1 and OpenGL ES 2. Changed generated native glue code to #define GL_APIENTRY appropriately on the desktop. Refactored custom C code. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@96 a78bb65f-1512-4460-ba86-f6dc96a7bf27 --- src/java/com/sun/gluegen/opengl/GLEmitter.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/java/com/sun/gluegen/opengl') diff --git a/src/java/com/sun/gluegen/opengl/GLEmitter.java b/src/java/com/sun/gluegen/opengl/GLEmitter.java index b9c4349..ae4d5ec 100644 --- a/src/java/com/sun/gluegen/opengl/GLEmitter.java +++ b/src/java/com/sun/gluegen/opengl/GLEmitter.java @@ -360,6 +360,9 @@ public class GLEmitter extends ProcAddressEmitter iter.remove(); // remove ARB function // make the function being dynamical fetched, due to it's dynamic naming scheme ((GLConfiguration)cfg).addForceProcAddressGen(uniName.getUni()); + // Make sure we produce the right calling convention for + // the typedefed function pointers on Windows + ((GLConfiguration)cfg).addLocalProcAddressCallingConvention(uniName.getUni(), "GL_APIENTRY"); } } } -- cgit v1.2.3