diff options
author | Sven Gothel <[email protected]> | 2008-07-18 15:45:09 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-18 15:45:09 +0000 |
commit | 52a5e479db5e2ad41889d69fb470922f35438e3e (patch) | |
tree | cfd94cb61b0cc26ba69ca92459e4e5dfd8e45002 | |
parent | 2d1e844b7e621cb7bce6576d559f297dc842f6ed (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.cfg | 4 | ||||
-rw-r--r-- | make/gl-impl-CustomJavaCode-gl2_es2.java | 7 |
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) |