summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-14 13:08:16 +0200
committerSven Gothel <[email protected]>2011-09-14 13:08:16 +0200
commitf45753d2da46786b023166f805bacbc3bdce71c1 (patch)
treef927ebbd2fd82b60cf279132c0b04f75defe21ce /src/nativewindow
parent430eff8c3ffab8c69c149ba1c633d2b03f2ef2d3 (diff)
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
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/Capabilities.java7
1 files changed, 4 insertions, 3 deletions
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. */