From 0969a98f2007d76e38f8819eedfead5b840f6364 Mon Sep 17 00:00:00 2001 From: Travis Bryson <travis_bryson@dev.java.net> Date: Fri, 24 Jun 2005 20:28:37 +0000 Subject: This putback adds array offsets to the public JOGL API. The offsets are respected and used properly in all of the public and private functions. The changes are in gluegen, so that the code is generated properly. And also throughout the parts of the jogl code that are not gluegen-generated. For the internally generated implementation methods, a "1" is added to the method names. So as to not overload the public API. This is similar to what is already done with Buffer APIs, which have a "0" added internally. I used a "1" instead of a "0" to avoid any collisions of the signatures, which could happen if a null object was sent down for the Array (e.g., the wrong method would get called). This should be a suitable foundation for the implementation to add the ability to wrap arrays in Buffers, which we plan to add to the implementation soon. These changes will cause all existing JOGL programs to break, although adapting them is pretty easy. We will later be putting back changed examples and utilities that incorporate these new APIs. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@313 232f8b59-042b-4e1e-8c03-345bb8c30851 --- make/gl-impl-CustomJavaCode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'make/gl-impl-CustomJavaCode.java') diff --git a/make/gl-impl-CustomJavaCode.java b/make/gl-impl-CustomJavaCode.java index a4709fde4..546fa8f2d 100644 --- a/make/gl-impl-CustomJavaCode.java +++ b/make/gl-impl-CustomJavaCode.java @@ -32,7 +32,7 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) { throw new GLException("Method \"glMapBuffer\" not available"); } int[] sz = new int[1]; - glGetBufferParameteriv(target, GL_BUFFER_SIZE_ARB, sz); + glGetBufferParameteriv(target, GL_BUFFER_SIZE_ARB, sz, 0); long addr; addr = dispatch_glMapBuffer(target, access, __addr_); if (addr == 0 || sz[0] == 0) { @@ -55,7 +55,7 @@ public java.nio.ByteBuffer glMapBufferARB(int target, int access) { throw new GLException("Method \"glMapBufferARB\" not available"); } int[] sz = new int[1]; - glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, sz); + glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, sz, 0); long addr; addr = dispatch_glMapBufferARB(target, access, __addr_); if (addr == 0 || sz[0] == 0) { -- cgit v1.2.3