aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-07-08 16:02:53 +0000
committerKenneth Russel <[email protected]>2005-07-08 16:02:53 +0000
commitc6d6bcbcaceaa229944f380437a28af3a84f1dcd (patch)
tree5415f8a6a956de81ffe7abd01451f99c76f23824 /src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
parent0fa2740c8c186b0908baa5b7629bef657fe38527 (diff)
Fixed Windows port after changes to GlueGen to include array offsets.
Ported all demos to new API. Temporarily added back in GLU entry points taking primitive arrays as the underlying APIs (in particular, glTexImage2D) do not yet support non-direct Buffers. Changed C code generation to only add in array offset if array is non-null. Fixed bug in GLU tesselator demo's vertex callback. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@318 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java')
-rw-r--r--src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
index 1790207a8..922f60794 100644
--- a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
+++ b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
@@ -148,7 +148,7 @@ public class JavaMethodBindingImplEmitter extends JavaMethodBindingEmitter
} else if (javaType.isArray() && !javaType.isNIOBufferArray() &&!javaType.isStringArray()) {
String argName = binding.getArgumentName(i);
String offsetArg = argName + "_offset";
- writer.println(" if(" + argName + ".length <= " + offsetArg + ")");
+ writer.println(" if(" + argName + " != null && " + argName + ".length <= " + offsetArg + ")");
writer.print(" throw new " + getRuntimeExceptionType());
writer.println("(\"array offset argument \\\"" + offsetArg + "\\\" equals or exceeds array length\");");
}