aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-08-21 15:55:37 +0200
committerSven Gothel <[email protected]>2012-08-21 15:55:37 +0200
commit4abaf513bcc91a2d4b3ec4842c532807cbe66167 (patch)
treeadcba60c10458ad0bd84f132ade9568737c4bb6c /src/newt/classes
parent27e81bf4d851ce2b81763920b4d1981c6a44b42a (diff)
Fix/Workaround: For BCM_VC_IV EGL (alpha) configuration
Native BCM_VC_IV code CreateWindow() uses the default alpha value setting, which is alpha:8 ! Hence we require to chose alpha from the egl configurations TODO: Properly select the alpha mode in CreateWindow()! This will allow this hack.
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
index 6d4f36964..7b8d2e958 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
@@ -29,6 +29,7 @@
package jogamp.newt.driver.bcm.vc.iv;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.Capabilities;
import javax.media.nativewindow.GraphicsConfigurationFactory;
import javax.media.nativewindow.NativeWindowException;
import javax.media.nativewindow.VisualIDHolder;
@@ -52,8 +53,14 @@ public class WindowDriver extends WindowImpl {
if(0!=getParentWindowHandle()) {
throw new RuntimeException("Window parenting not supported (yet)");
}
+ // FIXME: Hack - Native BCM_VC_IV code CreateWindow() uses the default alpha value setting,
+ // which is alpha:8 ! Hence we require to chose alpha from the egl configurations.
+ // TODO: Properly select the alpha mode in CreateWindow()! This will allow this hack.
+ final Capabilities capsChosen = (Capabilities) capsRequested.cloneMutable();
+ capsChosen.setAlphaBits(1);
+
final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
- capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
+ capsChosen, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
if (null == cfg) {
throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
}