diff options
Diffstat (limited to 'make/gl-impl-CustomJavaCode-gl2_es2.java')
-rw-r--r-- | make/gl-impl-CustomJavaCode-gl2_es2.java | 7 |
1 files changed, 4 insertions, 3 deletions
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) |