summaryrefslogtreecommitdiffstats
path: root/src/demos/hwShadowmapsSimple
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-02-23 23:00:59 +0000
committerKenneth Russel <[email protected]>2005-02-23 23:00:59 +0000
commit44bb69b570e3e7c4bafabc1116606da0f520fbc4 (patch)
tree16283e9e415615c534f6d9835951c1e3af8c284b /src/demos/hwShadowmapsSimple
parent0ae7ec200ff792fb382025d6f9a9d16bc9aed8a7 (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/hwShadowmapsSimple')
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java27
1 files changed, 2 insertions, 25 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();