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). --- .../cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java index 690e0466b..702d66fce 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java @@ -100,11 +100,6 @@ public class MacOSXAWTCGLGraphicsConfigurationFactory extends GraphicsConfigurat } GraphicsConfiguration gc = device.getDefaultConfiguration(); - capsChosen = (GLCapabilitiesImmutable) AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsChosen, gc); - if(DEBUG) { - System.err.println("AWT Colormodel compatible: "+capsChosen); - } - MacOSXCGLGraphicsConfiguration macConfig = (MacOSXCGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(macDevice).chooseGraphicsConfiguration(capsChosen, capsRequested, @@ -114,7 +109,8 @@ public class MacOSXAWTCGLGraphicsConfigurationFactory extends GraphicsConfigurat throw new GLException("Unable to choose a GraphicsConfiguration: "+capsChosen+",\n\t"+chooser+"\n\t"+macScreen); } - // FIXME: we have nothing to match .. so choose the default - return new AWTGraphicsConfiguration(awtScreen, macConfig.getChosenCapabilities(), macConfig.getRequestedCapabilities(), gc, macConfig); + // We have nothing to match .. so choose the default + return new AWTGraphicsConfiguration(awtScreen, macConfig.getChosenCapabilities(), macConfig.getRequestedCapabilities(), + gc, macConfig); } } -- cgit v1.2.3