summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-18 13:05:59 +0000
committerSven Gothel <[email protected]>2008-07-18 13:05:59 +0000
commit9ab3151dff72a0463e21566fe01d66e715f28dbe (patch)
tree976bfee250a245c0fd54f4a3eb3f6586be608a29
parentf36d2e40bb13d29dddd8baa0e24df569c50c8202 (diff)
Sync against JOGL2 changes
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@260 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
-rwxr-xr-xsrc/demos/es1/RedSquare.java2
-rwxr-xr-xsrc/demos/es1/angeles/AngelesES1.java18
-rwxr-xr-xsrc/demos/es1/angeles/AngelesGL2ES1.java18
-rw-r--r--src/demos/es1/cube/Cube.java12
4 files changed, 25 insertions, 25 deletions
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 5fb8004..35707ee 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -94,7 +94,7 @@ public class RedSquare implements MouseListener, GLEventListener {
public void init(GLAutoDrawable drawable) {
GL2ES1 gl = drawable.getGL().getGL2ES1();
- glu = GLU.createGLU(gl);
+ glu = GLU.createGLU();
System.err.println("Entering initialization");
System.err.println("GL_VERSION=" + gl.glGetString(GL2ES1.GL_VERSION));
System.err.println("GL_EXTENSIONS:");
diff --git a/src/demos/es1/angeles/AngelesES1.java b/src/demos/es1/angeles/AngelesES1.java
index d60286a..19a1900 100755
--- a/src/demos/es1/angeles/AngelesES1.java
+++ b/src/demos/es1/angeles/AngelesES1.java
@@ -41,7 +41,7 @@ public class AngelesES1 implements GLEventListener {
0x10000, 0x10000,
-0x10000, 0x10000
});
- quadVertices.rewind();
+ quadVertices.flip();
light0Position=BufferUtil.newIntBuffer(4);
light0Diffuse=BufferUtil.newIntBuffer(4);
@@ -59,13 +59,13 @@ public class AngelesES1 implements GLEventListener {
light2Diffuse.put(new int[] { 0x11eb, 0x2b85, 0x23d7, 0x10000 });
materialSpecular.put(new int[] { 0x10000, 0x10000, 0x10000, 0x10000 });
- light0Position.rewind();
- light0Diffuse.rewind();
- light1Position.rewind();
- light1Diffuse.rewind();
- light2Position.rewind();
- light2Diffuse.rewind();
- materialSpecular.rewind();
+ light0Position.flip();
+ light0Diffuse.flip();
+ light1Position.flip();
+ light1Diffuse.flip();
+ light2Position.flip();
+ light2Diffuse.flip();
+ materialSpecular.flip();
seedRandom(15);
@@ -79,7 +79,7 @@ public class AngelesES1 implements GLEventListener {
// FIXME: gl.setSwapInterval(1);
this.gl = drawable.getGL().getGLES1();
- this.glu = GLU.createGLU(this.gl);
+ this.glu = GLU.createGLU();
gl.glEnable(gl.GL_NORMALIZE);
gl.glEnable(gl.GL_DEPTH_TEST);
gl.glDisable(gl.GL_CULL_FACE);
diff --git a/src/demos/es1/angeles/AngelesGL2ES1.java b/src/demos/es1/angeles/AngelesGL2ES1.java
index 57a1cbf..ce8fec1 100755
--- a/src/demos/es1/angeles/AngelesGL2ES1.java
+++ b/src/demos/es1/angeles/AngelesGL2ES1.java
@@ -41,7 +41,7 @@ public class AngelesGL2ES1 implements GLEventListener {
1.0f, 1.0f,
-1.0f, 1.0f
});
- quadVertices.rewind();
+ quadVertices.flip();
light0Position=BufferUtil.newFloatBuffer(4);
light0Diffuse=BufferUtil.newFloatBuffer(4);
@@ -59,13 +59,13 @@ public class AngelesGL2ES1 implements GLEventListener {
light2Diffuse.put(new float[] { FixedPoint.toFloat(0x11eb), FixedPoint.toFloat(0x2b85), FixedPoint.toFloat(0x23d7), 1.0f });
materialSpecular.put(new float[] { 1.0f, 1.0f, 1.0f, 1.0f });
- light0Position.rewind();
- light0Diffuse.rewind();
- light1Position.rewind();
- light1Diffuse.rewind();
- light2Position.rewind();
- light2Diffuse.rewind();
- materialSpecular.rewind();
+ light0Position.flip();
+ light0Diffuse.flip();
+ light1Position.flip();
+ light1Diffuse.flip();
+ light2Position.flip();
+ light2Diffuse.flip();
+ materialSpecular.flip();
seedRandom(15);
@@ -79,7 +79,7 @@ public class AngelesGL2ES1 implements GLEventListener {
// FIXME: gl.setSwapInterval(1);
this.gl = drawable.getGL().getGL2ES1();
- this.glu = GLU.createGLU(this.gl);
+ this.glu = GLU.createGLU();
gl.glEnable(gl.GL_NORMALIZE);
gl.glEnable(gl.GL_DEPTH_TEST);
gl.glDisable(gl.GL_CULL_FACE);
diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java
index ca17466..910d96b 100644
--- a/src/demos/es1/cube/Cube.java
+++ b/src/demos/es1/cube/Cube.java
@@ -49,30 +49,30 @@ public class Cube implements GLEventListener {
// Initialize data Buffers
this.cubeVertices = BufferUtil.newShortBuffer(s_cubeVertices.length);
cubeVertices.put(s_cubeVertices);
- cubeVertices.rewind();
+ cubeVertices.flip();
this.cubeColors = BufferUtil.newByteBuffer(s_cubeColors.length);
cubeColors.put(s_cubeColors);
- cubeColors.rewind();
+ cubeColors.flip();
this.cubeNormals = BufferUtil.newByteBuffer(s_cubeNormals.length);
cubeNormals.put(s_cubeNormals);
- cubeNormals.rewind();
+ cubeNormals.flip();
this.cubeIndices = BufferUtil.newByteBuffer(s_cubeIndices.length);
cubeIndices.put(s_cubeIndices);
- cubeIndices.rewind();
+ cubeIndices.flip();
if (useTexCoords) {
this.cubeTexCoords = BufferUtil.newShortBuffer(s_cubeTexCoords.length);
cubeTexCoords.put(s_cubeTexCoords);
- cubeTexCoords.rewind();
+ cubeTexCoords.flip();
}
}
public void init(GLAutoDrawable drawable) {
GL2ES1 gl = drawable.getGL().getGL2ES1();
- glu = GLU.createGLU(gl);
+ glu = GLU.createGLU();
}