diff options
author | Sven Gothel <[email protected]> | 2011-04-26 19:24:19 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-26 19:24:19 +0200 |
commit | f3afd3cd3be302c9b9cc3b6ec56cf032817e00a4 (patch) | |
tree | e7aaef0c1860f35f6b1e115489e134ae7df6d07c /src/demos/es1 | |
parent | a7317cf820a33cac7f068153649031483df53cac (diff) |
sync w/ jogl e007bb306124411e0232e51d16aa493cbd361f74
Diffstat (limited to 'src/demos/es1')
-rwxr-xr-x | src/demos/es1/RedSquare.java | 8 | ||||
-rwxr-xr-x | src/demos/es1/angeles/AngelesGL.java | 14 | ||||
-rwxr-xr-x | src/demos/es1/angeles/AngelesGLil.java | 12 | ||||
-rwxr-xr-x | src/demos/es1/angeles/Main.java | 4 | ||||
-rw-r--r-- | src/demos/es1/cube/Cube.java | 4 | ||||
-rw-r--r-- | src/demos/es1/cube/CubeImmModeSink.java | 2 | ||||
-rwxr-xr-x | src/demos/es1/cubefbo/Main.java | 4 |
7 files changed, 24 insertions, 24 deletions
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java index 1049ee7..0a672e5 100755 --- a/src/demos/es1/RedSquare.java +++ b/src/demos/es1/RedSquare.java @@ -131,12 +131,12 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo window.addKeyListener(this); window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); // window.setFullscreen(true); window.setVisible(true); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); if(!oneThread) { if(useAnimator) { @@ -152,7 +152,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } else { do { display(); - } while (!quit && window.getDuration() < 11000) ; + } while (!quit && window.getTotalFPSDuration() < 11000) ; shutdown(); } } @@ -284,7 +284,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo gl.glMatrixMode(gl.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0, 0, -10); - float ang = ((float) window.getDuration() * 360.0f) / 4000.0f; + float ang = ((float) window.getTotalFPSDuration() * 360.0f) / 4000.0f; gl.glRotatef(ang, 0, 0, 1); gl.glRotatef(ang, 0, 1, 0); diff --git a/src/demos/es1/angeles/AngelesGL.java b/src/demos/es1/angeles/AngelesGL.java index bc367d7..713cca7 100755 --- a/src/demos/es1/angeles/AngelesGL.java +++ b/src/demos/es1/angeles/AngelesGL.java @@ -298,14 +298,14 @@ public class GLSpatial { int[] tmp = new int[1]; gl.glGenBuffers(1, tmp, 0); vboName = tmp[0]; - - vArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, vOffset); - cArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, cOffset); + + vArrayData = GLArrayDataWrapper.createFixed(gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, vOffset, GL.GL_STATIC_DRAW); + cArrayData = GLArrayDataWrapper.createFixed(gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, cOffset, GL.GL_STATIC_DRAW); if(useNormalArray) { - nArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, nOffset); + nArrayData = GLArrayDataWrapper.createFixed(gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, nOffset, GL.GL_STATIC_DRAW); } } diff --git a/src/demos/es1/angeles/AngelesGLil.java b/src/demos/es1/angeles/AngelesGLil.java index 92be109..fab211f 100755 --- a/src/demos/es1/angeles/AngelesGLil.java +++ b/src/demos/es1/angeles/AngelesGLil.java @@ -298,13 +298,13 @@ public class GLSpatial { interlArray.position(count*(vComps+cComps+nComps)); interlArray.flip(); - vArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, vOffset); - cArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, cOffset); + vArrayData = GLArrayDataWrapper.createFixed(gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, vOffset, GL.GL_STATIC_DRAW); + cArrayData = GLArrayDataWrapper.createFixed(gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, cOffset, GL.GL_STATIC_DRAW); if(useNormalArray) { - nArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, nOffset); + nArrayData = GLArrayDataWrapper.createFixed(gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, nOffset, GL.GL_STATIC_DRAW); } } diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java index 743f961..ad1a5b5 100755 --- a/src/demos/es1/angeles/Main.java +++ b/src/demos/es1/angeles/Main.java @@ -75,7 +75,7 @@ public class Main implements WindowListener, MouseListener { window.addWindowListener(this); window.addMouseListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); window.setSize(width, height); window.setFullscreen(true); window.setVisible(true); @@ -97,7 +97,7 @@ public class Main implements WindowListener, MouseListener { } } - while (!quit && window.getDuration() < 215000) { + while (!quit && window.getTotalFPSDuration() < 215000) { window.display(); } diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java index fa88674..769bbe6 100644 --- a/src/demos/es1/cube/Cube.java +++ b/src/demos/es1/cube/Cube.java @@ -338,13 +338,13 @@ public class Cube implements GLEventListener { window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); window.setVisible(true); - while (!quit && window.getDuration() < 31000) { + while (!quit && window.getTotalFPSDuration() < 31000) { window.display(); } diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java index a75b274..944cad0 100644 --- a/src/demos/es1/cube/CubeImmModeSink.java +++ b/src/demos/es1/cube/CubeImmModeSink.java @@ -403,7 +403,7 @@ public class CubeImmModeSink implements GLEventListener { window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); diff --git a/src/demos/es1/cubefbo/Main.java b/src/demos/es1/cubefbo/Main.java index cd26556..b2da7a5 100755 --- a/src/demos/es1/cubefbo/Main.java +++ b/src/demos/es1/cubefbo/Main.java @@ -76,7 +76,7 @@ public class Main implements WindowListener, MouseListener { window.addWindowListener(this); window.addMouseListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); window.setSize(width, height); window.setFullscreen(false); window.setVisible(true); @@ -85,7 +85,7 @@ public class Main implements WindowListener, MouseListener { FBCubes cubes = new FBCubes(); window.addGLEventListener(cubes); - while ( !quit && window.getDuration() < 31000) { + while ( !quit && window.getTotalFPSDuration() < 31000) { window.display(); } |