From 01ba2ee689a87996301afe2b37ad919cb052882b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 13 Oct 2011 03:37:00 +0200 Subject: GLCanvas / GLWindow: Change 'manual' resize/repaint animation filter We not only shall skip windowing system triggered repaint if another animation thread is running, but also if the current thread is the animator thread. This keeps the animator intervals stable while resizing. --- src/jogl/classes/jogamp/opengl/GLDrawableHelper.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableHelper.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java index fcbf13aad..151ec2e9c 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java @@ -232,10 +232,18 @@ public class GLDrawableHelper { return ( null != animatorCtrl ) ? animatorCtrl.isStarted() && animatorCtrl.getThread() != Thread.currentThread() : false ; } + public final boolean isAnimatorRunning() { + return ( null != animatorCtrl ) ? animatorCtrl.isStarted() : false ; + } + public final boolean isExternalAnimatorAnimating() { return ( null != animatorCtrl ) ? animatorCtrl.isAnimating() && animatorCtrl.getThread() != Thread.currentThread() : false ; } + public final boolean isAnimatorAnimating() { + return ( null != animatorCtrl ) ? animatorCtrl.isAnimating() : false ; + } + public final void invoke(GLAutoDrawable drawable, boolean wait, GLRunnable glRunnable) { if( null == drawable || null == glRunnable ) { return; -- cgit v1.2.3