diff options
author | Sven Gothel <[email protected]> | 2008-08-21 17:40:54 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-08-21 17:40:54 +0000 |
commit | 0b657e84188652ea4e400861f778bdebcd35d6b3 (patch) | |
tree | dbac158f594cfcdb01962678fbc54b212a256460 /src/demos/es1/cube/CubeImmModeSink.java | |
parent | 53b839d9c65114998b561a9a9f9309dff9636f77 (diff) |
ES2 performance test: 1st draft
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@277 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es1/cube/CubeImmModeSink.java')
-rw-r--r-- | src/demos/es1/cube/CubeImmModeSink.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java index 219e5fd..c0ad4aa 100644 --- a/src/demos/es1/cube/CubeImmModeSink.java +++ b/src/demos/es1/cube/CubeImmModeSink.java @@ -43,6 +43,7 @@ public class CubeImmModeSink implements GLEventListener { this(false, false); } + private static boolean VBO_CACHE = true; ByteBuffer cubeIndices=null; ImmModeSink vboCubeF = null; @@ -78,7 +79,6 @@ public class CubeImmModeSink implements GLEventListener { if(null!=vboCubeF) { vboCubeF.draw(gl, cubeIndices, true); } - System.err.println("VBO Cube fin"); } private GLUquadric sphere=null; @@ -86,6 +86,7 @@ public class CubeImmModeSink implements GLEventListener { public void drawSphere(GL gl, float radius, int slices, int stacks) { if(sphere==null) { sphere = glu.gluNewQuadric(); + sphere.enableImmModeSink(true); sphere.setImmMode((VBO_CACHE)?false:true); } ImmModeSink vbo = vboSphere; @@ -105,12 +106,12 @@ public class CubeImmModeSink implements GLEventListener { } - private static boolean VBO_CACHE = true; private GLUquadric cylinder=null; private ImmModeSink vboCylinder=null; public void drawCylinder(GL gl, float radius, float halfHeight, int upAxis) { if(cylinder==null) { cylinder = glu.gluNewQuadric(); + cylinder.enableImmModeSink(true); cylinder.setImmMode((VBO_CACHE)?false:true); } @@ -409,7 +410,7 @@ public class CubeImmModeSink implements GLEventListener { long curTime; long startTime = System.currentTimeMillis(); - while (((curTime = System.currentTimeMillis()) - startTime) < 20000) { + while (((curTime = System.currentTimeMillis()) - startTime) < 31000) { window.display(); } |