diff options
author | Michael Bien <[email protected]> | 2010-03-29 15:38:31 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-03-29 15:38:31 +0200 |
commit | 0b708395a18eb6a2ae5372ff414bc75830ce19b6 (patch) | |
tree | f2cc555a6085f15972c319311dd01aa734b42b86 /src/demos/cubefbo/CubeObject.java | |
parent | 19528b880625ee830ab03cb2724311a874240fe8 (diff) |
modifications due to refactorings in gluegen and jogl.
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(); } |