From f45753d2da46786b023166f805bacbc3bdce71c1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 14 Sep 2011 13:08:16 +0200 Subject: Fix X11/Translucency (NV): Don't enable GLX.GLX_TRANSPARENT_TYPE; Always chooseConfig if translucent Don't enable GLX.GLX_TRANSPARENT_TYPE (X11) - if enabled, NV driver results in odd transparency effect (very high transparency) Always chooseConfig if translucent (X11) - recommended idx shall stay -1 if translucent, allowing our default chooser to pick up the proper config. this was previous reached due to the unavailable GLX_TRANSPARENT_TYPE request, which is now removed (see above) Allow translucency for non FBConfig, XVisual's only --- .../classes/javax/media/nativewindow/Capabilities.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/nativewindow') diff --git a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java index d02efb04f..368847e5c 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java +++ b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java @@ -117,7 +117,7 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl /** comparing RGBA values only */ public int compareTo(Object o) { if ( ! ( o instanceof Capabilities ) ) { - Class c = (null != o) ? o.getClass() : null ; + Class c = (null != o) ? o.getClass() : null ; throw new ClassCastException("Not a Capabilities object: " + c); } @@ -310,14 +310,15 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl } else { sink.append("offscr"); } - sink.append(", rgba ").append(redBits).append("/").append(greenBits).append("/").append(blueBits).append("/").append(alphaBits); + sink.append(", rgba 0x").append(toHexString(redBits)).append("/").append(toHexString(greenBits)).append("/").append(toHexString(blueBits)).append("/").append(toHexString(alphaBits)); if(backgroundOpaque) { sink.append(", opaque"); } else { - sink.append(", trans-rgba 0x").append(Integer.toHexString(transparentValueRed)).append("/").append(Integer.toHexString(transparentValueGreen)).append("/").append(Integer.toHexString(transparentValueBlue)).append("/").append(Integer.toHexString(transparentValueAlpha)); + sink.append(", trans-rgba 0x").append(toHexString(transparentValueRed)).append("/").append(toHexString(transparentValueGreen)).append("/").append(toHexString(transparentValueBlue)).append("/").append(toHexString(transparentValueAlpha)); } return sink; } + protected final String toHexString(int val) { return Integer.toHexString(val); } /** Returns a textual representation of this Capabilities object. */ -- cgit v1.2.3