diff options
author | Sven Gothel <[email protected]> | 2010-11-18 17:06:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-18 17:06:16 +0100 |
commit | 96af6c9bf2d683115996214cd895f9f9ef7ceea6 (patch) | |
tree | df27c2645d4f4db83c3def16712a5355a6cc2c2d /src/nativewindow/classes | |
parent | 5356769e7f6ebb0ab1322ab26b2dfb9284054e0d (diff) |
JOGL/AWT: Fix ~ 2 year old regressions: Choose & Use GraphicsConfiguration for Canvas. ; Adding FSAA test.
Canvas/X11:
The Canvas GraphicsConfiguraton should be chosen before the native peer is being created.
Choosing AWT GraphicsConfiguration (all platforms):
Don't filter our capabilities with 'AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsChosen, gc)',
not necessary (see above) and it would remove ourrequired alpha channel.
Canvas display():
Don't render if drawable is not realized (yet).
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/awt/AWTGraphicsConfiguration.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/javax/media/nativewindow/awt/AWTGraphicsConfiguration.java index 41051ab46..c3d10de10 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/awt/AWTGraphicsConfiguration.java +++ b/src/nativewindow/classes/javax/media/nativewindow/awt/AWTGraphicsConfiguration.java @@ -44,7 +44,6 @@ import javax.media.nativewindow.*; import java.awt.Component; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; -import java.awt.Transparency; import java.awt.image.ColorModel; import javax.media.nativewindow.AbstractGraphicsConfiguration; import com.jogamp.nativewindow.impl.Debug; @@ -125,14 +124,8 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple */ public static CapabilitiesImmutable setupCapabilitiesRGBABits(CapabilitiesImmutable capabilitiesIn, GraphicsConfiguration gc) { Capabilities capabilities = (Capabilities) capabilitiesIn.cloneMutable(); - - int cmTransparency = capabilities.isBackgroundOpaque()?Transparency.OPAQUE:Transparency.TRANSLUCENT; - ColorModel cm = gc.getColorModel(cmTransparency); - if(null==cm && !capabilities.isBackgroundOpaque()) { - capabilities.setBackgroundOpaque(true); - cmTransparency = Transparency.OPAQUE; - cm = gc.getColorModel(cmTransparency); - } + + ColorModel cm = gc.getColorModel(); if(null==cm) { throw new NativeWindowException("Could not determine AWT ColorModel"); } |