summaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media/opengl/GLJPanel.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-03-19 01:40:57 +0000
committerKenneth Russel <[email protected]>2006-03-19 01:40:57 +0000
commitdc079c1ecab4ec49af51a2adecf93c767dd6f801 (patch)
tree35c153e5d9a7e9e93787ca38748b7808c5609fc4 /src/classes/javax/media/opengl/GLJPanel.java
parentce18ee62ab347529a281e936e819377c10d51d26 (diff)
Fixed general bug in GLJPanel where the offscreen image was being
drawn from within the GLEventListener rather than in a guaranteed fashion from the AWT event queue thread within paintComponent(), causing problems on OS X with the new GLWorkerThread git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@669 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl/GLJPanel.java')
-rw-r--r--src/classes/javax/media/opengl/GLJPanel.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java
index 445ea3c4d..529b951a3 100644
--- a/src/classes/javax/media/opengl/GLJPanel.java
+++ b/src/classes/javax/media/opengl/GLJPanel.java
@@ -564,6 +564,11 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
} else {
drawableHelper.invokeGL(offscreenDrawable, offscreenContext, displayAction, initAction);
}
+
+ if (offscreenImage != null) {
+ // Draw resulting image in one shot
+ g.drawImage(offscreenImage, 0, 0, offscreenImage.getWidth(), offscreenImage.getHeight(), this);
+ }
}
}
@@ -1038,8 +1043,8 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
}
}
- // Draw resulting image in one shot
- g.drawImage(offscreenImage, 0, 0, offscreenImage.getWidth(), offscreenImage.getHeight(), GLJPanel.this);
+ // Note: image will be drawn back in paintComponent() for
+ // correctness on all platforms
}
}
} else {