diff options
author | Sven Gothel <[email protected]> | 2010-03-30 02:06:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-03-30 02:06:00 +0200 |
commit | 2e4835c543d32791cf3c79907aecad7c4692f457 (patch) | |
tree | 613d0f21c1cb79a400b4b188534ec033343bfc87 /src/demos/vertexBufferObject/VertexBufferObject.java | |
parent | d3e818ea8b7c3f45ed4cfac7b0e7d3bd24f956e5 (diff) | |
parent | 0b708395a18eb6a2ae5372ff414bc75830ce19b6 (diff) |
Merge branch 'master' of github.com:mbien/jogl-demos
Diffstat (limited to 'src/demos/vertexBufferObject/VertexBufferObject.java')
-rw-r--r-- | src/demos/vertexBufferObject/VertexBufferObject.java | 11 |
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); |