summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/cube/CubeImmModeSink.java
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/es1/cube/CubeImmModeSink.java
parent19528b880625ee830ab03cb2724311a874240fe8 (diff)
modifications due to refactorings in gluegen and jogl.
Diffstat (limited to 'src/demos/es1/cube/CubeImmModeSink.java')
-rw-r--r--src/demos/es1/cube/CubeImmModeSink.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java
index fccbb5a..e91a595 100644
--- a/src/demos/es1/cube/CubeImmModeSink.java
+++ b/src/demos/es1/cube/CubeImmModeSink.java
@@ -31,6 +31,7 @@
*/
package demos.es1.cube;
+import com.jogamp.gluegen.runtime.Buffers;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import javax.media.nativewindow.*;
@@ -54,7 +55,7 @@ public class CubeImmModeSink implements GLEventListener {
ImmModeSink vboCubeF = null;
public void drawCube(GL2ES1 gl, float extent) {
if(cubeIndices==null) {
- cubeIndices = BufferUtil.newByteBuffer(s_cubeIndices);
+ cubeIndices = Buffers.newDirectByteBuffer(s_cubeIndices);
}
if(vboCubeF==null) {
@@ -66,9 +67,9 @@ public class CubeImmModeSink implements GLEventListener {
vbo.glBegin(GL.GL_TRIANGLES);
- vbo.glVertexv(BufferUtil.newShortBuffer(s_cubeVertices));
- vbo.glColorv(BufferUtil.newFloatBuffer(s_cubeColors));
- vbo.glNormalv(BufferUtil.newByteBuffer(s_cubeNormals));
+ vbo.glVertexv(Buffers.newDirectShortBuffer(s_cubeVertices));
+ vbo.glColorv(Buffers.newDirectFloatBuffer(s_cubeColors));
+ vbo.glNormalv(Buffers.newDirectByteBuffer(s_cubeNormals));
if(VBO_CACHE) {
vbo.glEnd(gl, false);