summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/cube/CubeImmModeSink.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-30 02:06:00 +0200
committerSven Gothel <[email protected]>2010-03-30 02:06:00 +0200
commit2e4835c543d32791cf3c79907aecad7c4692f457 (patch)
tree613d0f21c1cb79a400b4b188534ec033343bfc87 /src/demos/es1/cube/CubeImmModeSink.java
parentd3e818ea8b7c3f45ed4cfac7b0e7d3bd24f956e5 (diff)
parent0b708395a18eb6a2ae5372ff414bc75830ce19b6 (diff)
Merge branch 'master' of github.com:mbien/jogl-demos
Diffstat (limited to 'src/demos/es1/cube/CubeImmModeSink.java')
-rw-r--r--src/demos/es1/cube/CubeImmModeSink.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java
index 8b6092c..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.*;
@@ -38,8 +39,8 @@ import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.glsl.fixedfunc.*;
import java.nio.*;
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.opengl.*;
+import com.jogamp.newt.*;
+import com.jogamp.newt.opengl.*;
public class CubeImmModeSink implements GLEventListener {
boolean quit = false;
@@ -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);