aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-18 15:45:09 +0000
committerSven Gothel <[email protected]>2008-07-18 15:45:09 +0000
commit52a5e479db5e2ad41889d69fb470922f35438e3e (patch)
treecfd94cb61b0cc26ba69ca92459e4e5dfd8e45002
parent2d1e844b7e621cb7bce6576d559f297dc842f6ed (diff)
Preperation/Test: NioOnly __ALL__ - 20kB
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1727 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r--make/gl-common.cfg4
-rw-r--r--make/gl-impl-CustomJavaCode-gl2_es2.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index b400b7a49..7bba60ab0 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -181,9 +181,13 @@ IgnoreExtension GL_SGIS_texture_border_clamp
Opaque boolean GLboolean
ReturnsString glGetString
+# Experimental: Only NIO function, no arrays ..
+# NIOOnly __ALL__
+
#
# NIODirectOnly directives for vertex arrays and other core routines
#
+
NIODirectOnly glColorPointer
NIODirectOnly glEdgeFlagPointer
NIODirectOnly glFeedbackBuffer
diff --git a/make/gl-impl-CustomJavaCode-gl2_es2.java b/make/gl-impl-CustomJavaCode-gl2_es2.java
index dcc86eb20..064a8cb08 100644
--- a/make/gl-impl-CustomJavaCode-gl2_es2.java
+++ b/make/gl-impl-CustomJavaCode-gl2_es2.java
@@ -6,11 +6,12 @@
if(count<=0) {
throw new GLException("Method \"glShaderSource\" called with invalid length of source: "+count);
}
- int[] length = new int[count];
+ IntBuffer length = BufferUtil.newIntBuffer(count);
for(int i=0; i<count; i++) {
- length[i]=source[i].length();
+ length.put(source[i].length());
}
- glShaderSource(shader, count, source, length, 0);
+ length.flip();
+ glShaderSource(shader, count, source, length);
}
public void glShaderSource(IntBuffer shaders, java.lang.String[][] sources)