summaryrefslogtreecommitdiffstats
path: root/src/demos/vertexBufferObject
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-29 15:38:31 +0200
committerMichael Bien <[email protected]>2010-03-29 15:38:31 +0200
commit0b708395a18eb6a2ae5372ff414bc75830ce19b6 (patch)
treef2cc555a6085f15972c319311dd01aa734b42b86 /src/demos/vertexBufferObject
parent19528b880625ee830ab03cb2724311a874240fe8 (diff)
modifications due to refactorings in gluegen and jogl.
Diffstat (limited to 'src/demos/vertexBufferObject')
-rw-r--r--src/demos/vertexBufferObject/VertexBufferObject.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java
index 9c8bb26..5252867 100644
--- a/src/demos/vertexBufferObject/VertexBufferObject.java
+++ b/src/demos/vertexBufferObject/VertexBufferObject.java
@@ -33,6 +33,7 @@
package demos.vertexBufferObject;
+import com.jogamp.gluegen.runtime.Buffers;
import demos.common.Demo;
import demos.common.DemoListener;
import java.awt.BorderLayout;
@@ -48,7 +49,6 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import javax.media.opengl.GL;
import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
@@ -57,7 +57,6 @@ import javax.media.opengl.awt.AWTGLAutoDrawable;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.BufferUtil;
import javax.swing.JOptionPane;
@@ -374,8 +373,8 @@ public class VertexBufferObject extends Demo {
buffers[i].vertices = sliceBuffer(bigArray, startIndex, sliceSize);
buffers[i].normals = sliceBuffer(buffers[i].vertices, 3,
buffers[i].vertices.limit() - 3);
- buffers[i].vertexOffset = startIndex * BufferUtil.SIZEOF_FLOAT;
- buffers[i].normalOffset = (startIndex + 3) * BufferUtil.SIZEOF_FLOAT;
+ buffers[i].vertexOffset = startIndex * Buffers.SIZEOF_FLOAT;
+ buffers[i].normalOffset = (startIndex + 3) * Buffers.SIZEOF_FLOAT;
}
}
@@ -653,7 +652,7 @@ public class VertexBufferObject extends Demo {
for (int i = 0; i < len; i++) {
++numDrawElementsCalls;
gl.glDrawElements(primitive, 2 * STRIP_SIZE, GL2.GL_UNSIGNED_INT,
- i * 2 * STRIP_SIZE * BufferUtil.SIZEOF_INT);
+ i * 2 * STRIP_SIZE * Buffers.SIZEOF_INT);
if(getFlag('f')) {
gl.glFlush();
}
@@ -760,7 +759,7 @@ public class VertexBufferObject extends Demo {
elementBufferObject = tmp[0];
gl.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, elementBufferObject);
gl.glBufferData(GL.GL_ELEMENT_ARRAY_BUFFER,
- linearElements.remaining() * BufferUtil.SIZEOF_INT,
+ linearElements.remaining() * Buffers.SIZEOF_INT,
linearElements,
GL.GL_STATIC_DRAW);
gl.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, 0);