diff options
author | Kenneth Russel <[email protected]> | 2005-02-23 23:00:59 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-02-23 23:00:59 +0000 |
commit | 44bb69b570e3e7c4bafabc1116606da0f520fbc4 (patch) | |
tree | 16283e9e415615c534f6d9835951c1e3af8c284b /src/demos | |
parent | 0ae7ec200ff792fb382025d6f9a9d16bc9aed8a7 (diff) |
Removed unnecessary Animator from interactive HWShadowmapsSimple and
InfiniteShadowVolumes demos
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@58 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos')
-rw-r--r-- | src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 27 | ||||
-rw-r--r-- | src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java | 6 |
2 files changed, 2 insertions, 31 deletions
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index e600dbd..d36b7c6 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -62,7 +62,6 @@ public class HWShadowmapsSimple { private GLCanvas canvas; private GLPbuffer pbuffer; - private Animator animator; private GLUT glut; @@ -132,11 +131,6 @@ public class HWShadowmapsSimple { private Mat4f spotlightInverseTransform = new Mat4f(); private Mat4f objectTransform = new Mat4f(); - // Profiling - private DurationTimer timer = new DurationTimer(); - private boolean firstRender = true; - private int frameCount; - public static void main(String[] args) { new HWShadowmapsSimple().run(args); } @@ -144,9 +138,6 @@ public class HWShadowmapsSimple { public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); - canvas.setNoAutoRedrawMode(true); - - animator = new Animator(canvas); Frame frame = new Frame("ARB_shadow Shadows"); frame.setLayout(new BorderLayout()); @@ -161,8 +152,6 @@ public class HWShadowmapsSimple { runExit(); } }); - - animator.start(); } //---------------------------------------------------------------------- @@ -318,19 +307,6 @@ public class HWShadowmapsSimple { return; } - if (!firstRender) { - if (++frameCount == 30) { - timer.stop(); - System.err.println("Frames per second: " + (30.0f / timer.getDurationAsSeconds())); - timer.reset(); - timer.start(); - frameCount = 0; - } - } else { - firstRender = false; - timer.start(); - } - GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); @@ -344,6 +320,8 @@ public class HWShadowmapsSimple { gl.glLoadIdentity(); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); + // Schedule repaint to clean up first bogus frame + canvas.repaint(); } switch (displayMode) { @@ -840,7 +818,6 @@ public class HWShadowmapsSimple { // exit routine in another thread. new Thread(new Runnable() { public void run() { - animator.stop(); System.exit(0); } }).start(); diff --git a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java index 4752dbb..91eb6e6 100644 --- a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java +++ b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java @@ -67,7 +67,6 @@ import gleem.linalg.*; public class InfiniteShadowVolumes { private GLCanvas canvas; - private Animator animator; private volatile boolean quit; public static void main(String[] args) { @@ -80,8 +79,6 @@ public class InfiniteShadowVolumes { canvas = GLDrawableFactory.getFactory().createGLCanvas(caps); canvas.addGLEventListener(new Listener()); - animator = new Animator(canvas); - Frame frame = new Frame("Infinite Stenciled Shadow Volumes"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 512); @@ -95,8 +92,6 @@ public class InfiniteShadowVolumes { runExit(); } }); - - animator.start(); } static class Model { @@ -1294,7 +1289,6 @@ public class InfiniteShadowVolumes { // the exit routine in another thread. new Thread(new Runnable() { public void run() { - animator.stop(); System.exit(0); } }).start(); |