diff options
author | Sven Gothel <[email protected]> | 2010-11-23 05:09:51 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-23 05:09:51 +0100 |
commit | dec9bd072b8de0669e6fac48b2ca144bbaaad5fc (patch) | |
tree | 8eebc9ad6f2032fd6c36e272109bbc7b3327842a /src/jogl/classes/javax | |
parent | 0a9fd92b5f1aabf932fa3a2858f83de3c458823a (diff) |
Add GLJPanel test (works better in jogl-demos though, need to copy)
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 0f724d558..c69603e41 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -219,10 +219,14 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { } if (backend != null) { - boolean animatorWasAnimating = false; + boolean animatorPaused = false; GLAnimatorControl animator = getAnimator(); if(null!=animator) { - animatorWasAnimating = animator.isAnimating(); + if(regenerate) { + animatorPaused = animator.pause(); + } else { + animator.remove(this); + } } disposeRegenerate=regenerate; @@ -254,8 +258,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { isInitialized = false; } - if(regenerate && animatorWasAnimating && animator.isPaused()) { - animator.resume(); + if(animatorPaused) { + animator.resume(); } } @@ -1581,9 +1585,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { System.err.println("-- Created Context: "+joglContext); } } - if (DEBUG) { + /*if (DEBUG) { joglContext.setGL(new DebugGL2(joglContext.getGL().getGL2())); - } + }*/ if (Java2D.isFBOEnabled() && Java2D.getOGLSurfaceType(g) == Java2D.FBOBJECT && |