From db0bdc71eec40d7fcd22ddcea87178c8805d4312 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 7 Aug 2003 19:53:38 +0000 Subject: Changed glMapBufferARB's implementation to return the same ByteBuffer if the address and capacity of the underlying buffer object haven't changed. This saves applications the cost of re-slicing the returned buffer each frame and avoids allocation of one or more finalizable objects per frame. Moved GlueGen's checking of whether a passed buffer is direct up into Java from C to be able to handle buffers that wrap the NULL pointer (needed for the "buffer offsets" used by ARB_vertex_buffer_object). Ported the VertexArrayRange demo to VertexBufferObject. Currently slower than VertexArrayRange but needs to be updated to triangulate the geometry more efficiently (currently the triangle strips are only 48 vertices long) and to move the indices into fast RAM. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@47 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/gluegen/MethodBinding.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/net/java/games/gluegen/MethodBinding.java') diff --git a/src/net/java/games/gluegen/MethodBinding.java b/src/net/java/games/gluegen/MethodBinding.java index b8f0eefdf..af86f0b66 100644 --- a/src/net/java/games/gluegen/MethodBinding.java +++ b/src/net/java/games/gluegen/MethodBinding.java @@ -184,8 +184,10 @@ public class MethodBinding { JavaType javaArgType = getJavaArgumentType(i); Type cArgType = getCArgumentType(i); if (javaArgType.isCompoundTypeWrapper() || + javaArgType.isNIOBuffer() || cArgType.isArray()) { - // Needs unwrapping of accessors or checking of array lengths + // Needs unwrapping of accessors, checking of array + // lengths, or checking of direct buffer property needsBody = true; break; } -- cgit v1.2.3