summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/Animator.java14
-rw-r--r--src/jogl/classes/javax/media/opengl/GLAnimatorControl.java4
2 files changed, 7 insertions, 11 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
index 2b8876a91..ecb3878ba 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -40,14 +40,10 @@
package com.jogamp.opengl.util;
-import javax.media.opengl.GLAnimatorControl;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
-import com.jogamp.opengl.impl.Debug;
-import java.util.*;
/** <P> An Animator can be attached to one or more {@link
@@ -154,9 +150,9 @@ public class Animator extends AnimatorBase {
}
}
}
- if ( !shouldStop ) {
+ if ( !shouldStop && !shouldPause) {
display();
- if (!runAsFastAsPossible) {
+ if ( !runAsFastAsPossible) {
// Avoid swamping the CPU
Thread.yield();
}
@@ -219,8 +215,8 @@ public class Animator extends AnimatorBase {
public synchronized void stop() {
boolean started = null != thread;
- if ( !started || !isAnimating ) {
- throw new GLException("Not running (started "+started+" (true), animating "+isAnimating+" (true) )");
+ if ( !started ) {
+ throw new GLException("Not started");
}
shouldStop = true;
notifyAll();
@@ -230,7 +226,7 @@ public class Animator extends AnimatorBase {
// use a couple of heuristics to determine whether we should do
// the blocking wait().
if (!impl.skipWaitForCompletion(thread)) {
- while (isAnimating && thread != null) {
+ while (thread != null) {
try {
wait();
} catch (InterruptedException ie) {
diff --git a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
index 3aba634a0..01e5646f9 100644
--- a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
+++ b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
@@ -129,7 +129,7 @@ public interface GLAnimatorControl {
* @see #stop()
* @see #isAnimating()
* @see #getThread()
- * @throws GLException if started and animating already
+ * @throws GLException if started already
*/
void start();
@@ -144,7 +144,7 @@ public interface GLAnimatorControl {
* @see #start()
* @see #isAnimating()
* @see #getThread()
- * @throws GLException if not started or not animating
+ * @throws GLException if not started
*/
void stop();