From 9e0f6e9e2dd2c7822032b52a4326b308d67b65e7 Mon Sep 17 00:00:00 2001
From: Kenneth Russel <kbrussel@alum.mit.edu>
Date: Sat, 3 Sep 2005 22:02:17 +0000
Subject: Added Vertex Buffer Object and Pixel Buffer Object variants of
 routines affected by these extensions. New variants take long as argument
 instead of Buffer for void*. For these routines as well as the original
 versions, must check whether VBO/PBO is active or inactive. Added check to
 affected methods to guarantee they are not called within glBegin/glEnd pairs
 (which in most, if not all, cases is already a requirement) to avoid tracking
 OpenGL state manually. Added new JavaPrologue and JavaEpilogue commands to
 JavaConfiguration with optional signatures to differentiate overloaded
 methods. Added BufferObjectKind command to GLConfiguration which builds on
 JavaPrologue support. Deleted BufferUtils.bufferOffset() and associated
 native code.

In order to reduce the number of extension routines, added
IgnoreExtension directives for all extensions folded into OpenGL 1.1,
1.2 and 1.3 specifications; this means that if the core OpenGL version
is less than 1.3 then these extensions are effectively unavailable.

Updated demos for both new VBO/PBO API variants as well as extensions
folded into core.


git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@120 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
---
 src/demos/vertexBufferObject/VertexBufferObject.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/demos/vertexBufferObject/VertexBufferObject.java')

diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java
index 0c33fa1..ee78499 100644
--- a/src/demos/vertexBufferObject/VertexBufferObject.java
+++ b/src/demos/vertexBufferObject/VertexBufferObject.java
@@ -559,8 +559,8 @@ public class VertexBufferObject implements GLEventListener {
       int vertexIndex = 0;
 
       if (vboEnabled) {
-        gl.glVertexPointer(3, GL.GL_FLOAT, 6 * SIZEOF_FLOAT, BufferUtils.bufferOffset(buffers[cur].vertexOffset));
-        gl.glNormalPointer(   GL.GL_FLOAT, 6 * SIZEOF_FLOAT, BufferUtils.bufferOffset(buffers[cur].normalOffset));
+        gl.glVertexPointer(3, GL.GL_FLOAT, 6 * SIZEOF_FLOAT, buffers[cur].vertexOffset);
+        gl.glNormalPointer(   GL.GL_FLOAT, 6 * SIZEOF_FLOAT, buffers[cur].normalOffset);
       } else {
         gl.glVertexPointer(3, GL.GL_FLOAT, 6 * SIZEOF_FLOAT, v);
         gl.glNormalPointer(   GL.GL_FLOAT, 6 * SIZEOF_FLOAT, buffers[cur].normals);
@@ -634,7 +634,7 @@ public class VertexBufferObject implements GLEventListener {
         for (int i = 0; i < len; i++) {
           ++numDrawElementsCalls;
           gl.glDrawElements(primitive, 2 * STRIP_SIZE, GL.GL_UNSIGNED_INT,
-                            BufferUtils.bufferOffset(i * 2 * STRIP_SIZE * BufferUtils.SIZEOF_INT));
+                            i * 2 * STRIP_SIZE * BufferUtils.SIZEOF_INT);
           if(getFlag('f')) {
             gl.glFlush();
           }
-- 
cgit v1.2.3