aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/util/Animator.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-11 07:41:31 -0700
committerSven Gothel <[email protected]>2009-10-11 07:41:31 -0700
commit8f76db4364f66c36780e762e086a18d5cc315363 (patch)
tree6c3291b08c76018bda59ad6fe3acf8fe686d0eb4 /src/jogl/classes/com/sun/opengl/util/Animator.java
parent6f6436ab9c7345f4d3b7bf5d8ee70addc9f11ab0 (diff)
NEWT X11 Display Lock:
Integrate Display.lock/unlock, so the generic Window will call it. Specialized for X11Display, the only real impl of it. Fixes offscreen EDT usage .. GLProfile: Add isAWTAvailable() and isAWTJOGLAvailable() TextureIO: - Add NetPbmTextureWriter - Only use IIOTexture* if !isAWTJOGLAvailable() - Add write (TextureData, File)
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/util/Animator.java')
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/util/Animator.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/jogl/classes/com/sun/opengl/util/Animator.java b/src/jogl/classes/com/sun/opengl/util/Animator.java
index a10717881..1d4b832e8 100755
--- a/src/jogl/classes/com/sun/opengl/util/Animator.java
+++ b/src/jogl/classes/com/sun/opengl/util/Animator.java
@@ -43,6 +43,8 @@ import java.util.*;
import javax.media.opengl.*;
+import com.sun.opengl.impl.Debug;
+
/** <P> An Animator can be attached to one or more {@link
GLAutoDrawable}s to drive their display() methods in a loop. </P>
@@ -53,7 +55,7 @@ import javax.media.opengl.*;
*/
public class Animator {
- protected static final boolean DEBUG = com.sun.opengl.impl.Debug.debug("Animator");
+ protected static final boolean DEBUG = Debug.debug("Animator");
private volatile ArrayList/*<GLAutoDrawable>*/ drawables = new ArrayList();
private AnimatorImpl impl;
@@ -67,10 +69,13 @@ public class Animator {
/** Creates a new, empty Animator. */
public Animator(ThreadGroup tg) {
- try {
- // Try to use the AWT-capable Animator implementation by default
- impl = (AnimatorImpl) Class.forName("com.sun.opengl.util.awt.AWTAnimatorImpl").newInstance();
- } catch (Exception e) {
+
+ if(GLProfile.isAWTJOGLAvailable()) {
+ try {
+ impl = (AnimatorImpl) Class.forName("com.sun.opengl.util.awt.AWTAnimatorImpl").newInstance();
+ } catch (Exception e) { }
+ }
+ if(null==impl) {
impl = new AnimatorImpl();
}
threadGroup = tg;