diff options
Diffstat (limited to 'src/classes/javax/media/opengl')
-rw-r--r-- | src/classes/javax/media/opengl/GLJPanel.java | 9 |
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 { |