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/JavaConfiguration.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java') diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java index e7787fc..8cde267 100644 --- a/src/java/com/sun/gluegen/JavaConfiguration.java +++ b/src/java/com/sun/gluegen/JavaConfiguration.java @@ -1018,8 +1018,12 @@ public class JavaConfiguration { protected void readCustomJavaCode(StringTokenizer tok, String filename, int lineNo) { try { String className = tok.nextToken(); - String restOfLine = tok.nextToken("\n\r\f"); - addCustomJavaCode(className, restOfLine); + try { + String restOfLine = tok.nextToken("\n\r\f"); + addCustomJavaCode(className, restOfLine); + } catch (NoSuchElementException e) { + addCustomJavaCode(className, ""); + } } catch (NoSuchElementException e) { throw new RuntimeException("Error parsing \"CustomJavaCode\" command at line " + lineNo + " in file \"" + filename + "\"", e); @@ -1036,8 +1040,7 @@ public class JavaConfiguration { String restOfLine = tok.nextToken("\n\r\f"); customCCode.add(restOfLine); } catch (NoSuchElementException e) { - throw new RuntimeException("Error parsing \"CustomCCode\" command at line " + lineNo + - " in file \"" + filename + "\"", e); + customCCode.add(""); } } -- cgit v1.2.3