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/cubefbo/CubeObject.java | |
parent | d3e818ea8b7c3f45ed4cfac7b0e7d3bd24f956e5 (diff) | |
parent | 0b708395a18eb6a2ae5372ff414bc75830ce19b6 (diff) |
Merge branch 'master' of github.com:mbien/jogl-demos
Diffstat (limited to 'src/demos/cubefbo/CubeObject.java')
-rwxr-xr-x | src/demos/cubefbo/CubeObject.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/demos/cubefbo/CubeObject.java b/src/demos/cubefbo/CubeObject.java index bf3f8bc..dd3da91 100755 --- a/src/demos/cubefbo/CubeObject.java +++ b/src/demos/cubefbo/CubeObject.java @@ -33,34 +33,35 @@ package demos.cubefbo; +import com.jogamp.gluegen.runtime.Buffers; import java.nio.ByteBuffer; import java.nio.ShortBuffer; import javax.media.opengl.GL; import javax.media.opengl.GL2ES1; import javax.media.opengl.GL2; -import com.jogamp.opengl.util.BufferUtil; class CubeObject { - public CubeObject (boolean useTexCoords) { + + CubeObject (boolean useTexCoords) { // Initialize data Buffers - this.cubeVertices = BufferUtil.newShortBuffer(s_cubeVertices.length); + this.cubeVertices = Buffers.newDirectShortBuffer(s_cubeVertices.length); cubeVertices.put(s_cubeVertices); cubeVertices.rewind(); - this.cubeColors = BufferUtil.newByteBuffer(s_cubeColors.length); + this.cubeColors = Buffers.newDirectByteBuffer(s_cubeColors.length); cubeColors.put(s_cubeColors); cubeColors.rewind(); - this.cubeNormals = BufferUtil.newByteBuffer(s_cubeNormals.length); + this.cubeNormals = Buffers.newDirectByteBuffer(s_cubeNormals.length); cubeNormals.put(s_cubeNormals); cubeNormals.rewind(); - this.cubeIndices = BufferUtil.newByteBuffer(s_cubeIndices.length); + this.cubeIndices = Buffers.newDirectByteBuffer(s_cubeIndices.length); cubeIndices.put(s_cubeIndices); cubeIndices.rewind(); if (useTexCoords) { - this.cubeTexCoords = BufferUtil.newShortBuffer(s_cubeTexCoords.length); + this.cubeTexCoords = Buffers.newDirectShortBuffer(s_cubeTexCoords.length); cubeTexCoords.put(s_cubeTexCoords); cubeTexCoords.rewind(); } |