From 8f76db4364f66c36780e762e086a18d5cc315363 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 11 Oct 2009 07:41:31 -0700 Subject: 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) --- src/jogl/classes/com/sun/opengl/util/Animator.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/util/Animator.java') 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; + /**

An Animator can be attached to one or more {@link GLAutoDrawable}s to drive their display() methods in a loop.

@@ -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/**/ 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; -- cgit v1.2.3