diff options
author | Sven Gothel <[email protected]> | 2008-06-25 09:40:13 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-25 09:40:13 +0000 |
commit | 7c1206b1833d973b30e1b26d978d0d95315b55b6 (patch) | |
tree | 1290309417627a3db9c80a0730c52454d0550a23 /src/demos/es1/angeles/Angeles.java | |
parent | 665ee403e75d7024f660993713a537234a2d0826 (diff) |
JOGL2 GLES1 NEWT X11 - RedSquare - working
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@245 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es1/angeles/Angeles.java')
-rwxr-xr-x | src/demos/es1/angeles/Angeles.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/demos/es1/angeles/Angeles.java b/src/demos/es1/angeles/Angeles.java index c298adb..e793be2 100755 --- a/src/demos/es1/angeles/Angeles.java +++ b/src/demos/es1/angeles/Angeles.java @@ -249,7 +249,7 @@ public class GLObject { void seal() { - rewind(); + flip(); vbo = new int[3]; gl.glGenBuffers(3, vbo, 0); @@ -263,10 +263,10 @@ public class GLObject { if (null!=normalArray) { + gl.glEnableClientState(gl.GL_NORMAL_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vbo[2]); gl.glBufferData(GL.GL_ARRAY_BUFFER, normalArray.capacity() * BufferUtil.SIZEOF_INT, normalArray, GL.GL_STATIC_DRAW); gl.glNormalPointer(gl.GL_FLOAT, 0, 0); - gl.glEnableClientState(gl.GL_NORMAL_ARRAY); } else { gl.glDisableClientState(gl.GL_NORMAL_ARRAY); } @@ -281,9 +281,9 @@ public class GLObject { if (null!=normalArray) { + gl.glEnableClientState(gl.GL_NORMAL_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vbo[2]); gl.glNormalPointer(gl.GL_FIXED, 0, 0); - gl.glEnableClientState(gl.GL_NORMAL_ARRAY); } else gl.glDisableClientState(gl.GL_NORMAL_ARRAY); @@ -297,6 +297,13 @@ public class GLObject { normalArray.rewind(); } } + void flip() { + vertexArray.flip(); + colorArray.flip(); + if (normalArray != null) { + normalArray.flip(); + } + } } long sStartTick = 0; |