diff options
author | Kenneth Russel <[email protected]> | 2005-04-10 00:34:23 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-04-10 00:34:23 +0000 |
commit | 4f44fc490c647a0f3f5fc8b277266649c11b3691 (patch) | |
tree | 284861b9678aea3230d67c439f97d64964df7325 /src/net/java | |
parent | 67edaed7d4b9da5080bdd5d80a9206b821b93d7a (diff) |
Fixed Issue 148: Swing Component Shadow on GLJPanel
The test case specifies alpha bits in the GLCapabilities, which caused
the GLJPanel to create a TYPE_INT_ARGB BufferedImage to store the
results of the readback of the frame buffer for rendering into the
GLJPanel. This appears to not be the correct thing to do, because it
causes this BufferedImage to be alpha-blended with whatever other
rendering is performed into Java2D's backing store. Therefore when the
button was redrawn, its image would show up in this backing store
alpha-blended with the OpenGL rendering results since both were
redrawn simultaneously. I believe the correct solution is to never
create a BufferedImage with an alpha component for the framebuffer
readback even if alpha bits are specified in the GLCapabilities. This
is what has been implemented in the JOGL source base.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@258 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java')
-rw-r--r-- | src/net/java/games/jogl/GLJPanel.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/net/java/games/jogl/GLJPanel.java b/src/net/java/games/jogl/GLJPanel.java index 234908b80..229cc3446 100644 --- a/src/net/java/games/jogl/GLJPanel.java +++ b/src/net/java/games/jogl/GLJPanel.java @@ -454,11 +454,7 @@ public final class GLJPanel extends JPanel implements GLDrawable { // Should be more flexible in these BufferedImage formats; // perhaps see what the preferred image types are on the // given platform - if (offscreenCaps.getAlphaBits() > 0) { - awtFormat = BufferedImage.TYPE_INT_ARGB; - } else { - awtFormat = BufferedImage.TYPE_INT_RGB; - } + awtFormat = BufferedImage.TYPE_INT_RGB; // This seems to be a good choice on all platforms hwGLFormat = GL.GL_UNSIGNED_INT_8_8_8_8_REV; |