diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt/GLJPanel.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 192695955..10aeefaf5 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -213,7 +213,14 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { Exception ex1 = new Exception("Info: dispose("+regenerate+") - start"); ex1.printStackTrace(); } + if (backend != null) { + boolean animatorWasAnimating = false; + GLAnimatorControl animator = getAnimator(); + if(null!=animator) { + animatorWasAnimating = animator.isAnimating(); + } + disposeRegenerate=regenerate; disposeContext=backend.getContext(); disposeDrawable=backend.getDrawable(); @@ -242,6 +249,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { if(null==disposeContext) { isInitialized = false; } + + if(regenerate && animatorWasAnimating && animator.isPaused()) { + animator.resume(); + } } if(DEBUG) { |