From 96af6c9bf2d683115996214cd895f9f9ef7ceea6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 18 Nov 2010 17:06:16 +0100 Subject: 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). --- .../media/nativewindow/awt/AWTGraphicsConfiguration.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/nativewindow/classes') 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"); } -- cgit v1.2.3