diff options
Diffstat (limited to 'src/demos/es2')
-rwxr-xr-x | src/demos/es2/RedSquare.java | 4 | ||||
-rw-r--r-- | src/demos/es2/openmax/Cube.java | 24 | ||||
-rwxr-xr-x | src/demos/es2/openmax/MovieCube.java | 7 | ||||
-rwxr-xr-x | src/demos/es2/openmax/MovieSimple.java | 6 | ||||
-rwxr-xr-x | src/demos/es2/perftst/PerfTextLoad.java | 4 | ||||
-rwxr-xr-x | src/demos/es2/perftst/PerfUniLoad.java | 7 | ||||
-rwxr-xr-x | src/demos/es2/perftst/PerfVBOLoad.java | 2 | ||||
-rwxr-xr-x | src/demos/es2/perftst/Perftst.java | 5 |
8 files changed, 27 insertions, 32 deletions
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java index 958f118..59dec30 100755 --- a/src/demos/es2/RedSquare.java +++ b/src/demos/es2/RedSquare.java @@ -8,8 +8,8 @@ import javax.media.nativewindow.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.glsl.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class RedSquare extends Thread implements WindowListener, KeyListener, MouseListener, GLEventListener { diff --git a/src/demos/es2/openmax/Cube.java b/src/demos/es2/openmax/Cube.java index 620ce88..aa4b8dd 100644 --- a/src/demos/es2/openmax/Cube.java +++ b/src/demos/es2/openmax/Cube.java @@ -31,16 +31,16 @@ */ package demos.es2.openmax; +import com.jogamp.gluegen.runtime.Buffers; import java.nio.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; import javax.media.nativewindow.*; -import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.glsl.fixedfunc.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class Cube implements GLEventListener { boolean quit = false; @@ -53,19 +53,19 @@ public class Cube implements GLEventListener { this.innerCube = innerCube; // Initialize data Buffers - this.cubeVertices = BufferUtil.newShortBuffer(s_cubeVertices.length); + this.cubeVertices = Buffers.newDirectShortBuffer(s_cubeVertices.length); cubeVertices.put(s_cubeVertices); cubeVertices.flip(); - this.cubeColors = BufferUtil.newFloatBuffer(s_cubeColors.length); + this.cubeColors = Buffers.newDirectFloatBuffer(s_cubeColors.length); cubeColors.put(s_cubeColors); cubeColors.flip(); - this.cubeNormals = BufferUtil.newByteBuffer(s_cubeNormals.length); + this.cubeNormals = Buffers.newDirectByteBuffer(s_cubeNormals.length); cubeNormals.put(s_cubeNormals); cubeNormals.flip(); - this.cubeIndices = BufferUtil.newByteBuffer(s_cubeIndices.length); + this.cubeIndices = Buffers.newDirectByteBuffer(s_cubeIndices.length); cubeIndices.put(s_cubeIndices); cubeIndices.flip(); @@ -86,7 +86,7 @@ public class Cube implements GLEventListener { } } - this.cubeTexCoords = BufferUtil.newFloatBuffer(s_cubeTexCoords.length); + this.cubeTexCoords = Buffers.newDirectFloatBuffer(s_cubeTexCoords.length); cubeTexCoords.put(s_cubeTexCoords); cubeTexCoords.flip(); } @@ -151,26 +151,26 @@ public class Cube implements GLEventListener { gl.glEnableClientState(gl.GL_VERTEX_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[0]); - gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeVertices.limit() * BufferUtil.SIZEOF_SHORT, cubeVertices, GL.GL_STATIC_DRAW); + gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeVertices.limit() * Buffers.SIZEOF_SHORT, cubeVertices, GL.GL_STATIC_DRAW); gl.glVertexPointer(3, gl.GL_SHORT, 0, 0); gl.glEnableClientState(gl.GL_NORMAL_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[1]); - gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeNormals.limit() * BufferUtil.SIZEOF_BYTE, cubeNormals, GL.GL_STATIC_DRAW); + gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeNormals.limit() * Buffers.SIZEOF_BYTE, cubeNormals, GL.GL_STATIC_DRAW); gl.glNormalPointer(gl.GL_BYTE, 0, 0); gl.glEnableClientState(gl.GL_COLOR_ARRAY); if (cubeColors != null) { gl.glEnableClientState(gl.GL_COLOR_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[2]); - gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeColors.limit() * BufferUtil.SIZEOF_FLOAT, cubeColors, GL.GL_STATIC_DRAW); + gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeColors.limit() * Buffers.SIZEOF_FLOAT, cubeColors, GL.GL_STATIC_DRAW); gl.glColorPointer(4, gl.GL_FLOAT, 0, 0); } if (cubeTexCoords != null) { gl.glEnableClientState(gl.GL_TEXTURE_COORD_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[3]); - gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeTexCoords.limit() * BufferUtil.SIZEOF_SHORT, cubeTexCoords, GL.GL_STATIC_DRAW); + gl.glBufferData(GL.GL_ARRAY_BUFFER, cubeTexCoords.limit() * Buffers.SIZEOF_SHORT, cubeTexCoords, GL.GL_STATIC_DRAW); gl.glTexCoordPointer(2, gl.GL_SHORT, 0, 0); gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_INCR); } else { diff --git a/src/demos/es2/openmax/MovieCube.java b/src/demos/es2/openmax/MovieCube.java index 197b2c9..f59bea2 100755 --- a/src/demos/es2/openmax/MovieCube.java +++ b/src/demos/es2/openmax/MovieCube.java @@ -38,13 +38,12 @@ package demos.es2.openmax; import javax.media.opengl.*; import com.jogamp.opengl.util.glsl.fixedfunc.*; -import com.sun.openmax.*; +import com.jogamp.openmax.*; -import java.nio.*; import java.net.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class MovieCube implements MouseListener, GLEventListener, OMXEventListener { GLWindow window; diff --git a/src/demos/es2/openmax/MovieSimple.java b/src/demos/es2/openmax/MovieSimple.java index 3bd4156..b702699 100755 --- a/src/demos/es2/openmax/MovieSimple.java +++ b/src/demos/es2/openmax/MovieSimple.java @@ -39,13 +39,13 @@ import javax.media.opengl.*; import com.jogamp.opengl.util.glsl.*; import com.jogamp.opengl.util.*; -import com.sun.openmax.*; +import com.jogamp.openmax.*; import java.nio.*; import java.net.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class MovieSimple implements MouseListener, GLEventListener, OMXEventListener { private GLWindow window; diff --git a/src/demos/es2/perftst/PerfTextLoad.java b/src/demos/es2/perftst/PerfTextLoad.java index d58354b..30f0ad7 100755 --- a/src/demos/es2/perftst/PerfTextLoad.java +++ b/src/demos/es2/perftst/PerfTextLoad.java @@ -7,8 +7,8 @@ import javax.media.opengl.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.texture.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class PerfTextLoad extends PerfModule { static final int MAX_TEXTURE_ENGINES = 8; diff --git a/src/demos/es2/perftst/PerfUniLoad.java b/src/demos/es2/perftst/PerfUniLoad.java index a38baa3..170bf1a 100755 --- a/src/demos/es2/perftst/PerfUniLoad.java +++ b/src/demos/es2/perftst/PerfUniLoad.java @@ -1,11 +1,10 @@ package demos.es2.perftst; +import com.jogamp.gluegen.runtime.Buffers; import java.nio.*; import javax.media.opengl.*; import com.jogamp.opengl.util.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; public class PerfUniLoad extends PerfModule { static final int MAX_ARRAYS = 12; @@ -67,7 +66,7 @@ public class PerfUniLoad extends PerfModule { float x=0f, y=0f, z=0f, w=0f; for(int i=0; i<numObjs; i++) { - FloatBuffer fb = BufferUtil.newFloatBuffer(4*numArrayElem); + FloatBuffer fb = Buffers.newDirectFloatBuffer(4*numArrayElem); for(int j=0; j<numArrayElem; j++) { // Fill them up @@ -123,7 +122,7 @@ public class PerfUniLoad extends PerfModule { } int uniElements = numObjs * numArrayElem ; - int uniBytes = uniElements * BufferUtil.SIZEOF_FLOAT; + int uniBytes = uniElements * Buffers.SIZEOF_FLOAT; dt = 0; for(int i=1; i<loops; i++) { diff --git a/src/demos/es2/perftst/PerfVBOLoad.java b/src/demos/es2/perftst/PerfVBOLoad.java index ee9b251..d0b4a1d 100755 --- a/src/demos/es2/perftst/PerfVBOLoad.java +++ b/src/demos/es2/perftst/PerfVBOLoad.java @@ -4,8 +4,6 @@ import java.nio.*; import javax.media.opengl.*; import com.jogamp.opengl.util.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; public class PerfVBOLoad extends PerfModule { diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java index 4d1f7e0..5b090cd 100755 --- a/src/demos/es2/perftst/Perftst.java +++ b/src/demos/es2/perftst/Perftst.java @@ -1,14 +1,13 @@ package demos.es2.perftst; -import java.nio.*; import javax.media.opengl.*; import javax.media.nativewindow.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.glsl.*; -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.opengl.*; +import com.jogamp.newt.*; +import com.jogamp.newt.opengl.*; public class Perftst implements MouseListener, GLEventListener { |