summaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-06 04:47:07 +0200
committerSven Gothel <[email protected]>2011-10-06 04:47:07 +0200
commit6d28a9ed9ff039237775ea133377f8b59ca857c1 (patch)
tree694e7a0d03df52f6969c1326538ca1e62d94999c /src/newt
parent3f8eeefaf930bcff52e085c623de1cc927cc36c6 (diff)
NEWT/Android: Add TRANSLUCENT feature / Demo: 'GearsES2T'
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
index c5019bf63..2c7031dae 100644
--- a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
@@ -115,7 +115,9 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 {
public static int getFormat(CapabilitiesImmutable rCaps) {
int fmt = PixelFormat.UNKNOWN;
- if(rCaps.getRedBits()<=5 &&
+ if(!rCaps.isBackgroundOpaque()) {
+ fmt = PixelFormat.TRANSLUCENT;
+ } else if(rCaps.getRedBits()<=5 &&
rCaps.getGreenBits()<=6 &&
rCaps.getBlueBits()<=5 &&
rCaps.getAlphaBits()==0) {
@@ -313,7 +315,7 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 {
public void surfaceCreated(SurfaceHolder holder) {
Log.d(MD.TAG, "surfaceCreated: "+x+"/"+y+" "+width+"x"+height);
- surfaceRealized(holder);
+ // surfaceRealized(holder);
Log.d(MD.TAG, "surfaceCreated: X");
}
@@ -389,7 +391,8 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 {
class MSurfaceView extends SurfaceView {
public MSurfaceView (Context ctx) {
- super(ctx);
+ super(ctx);
+ setBackgroundDrawable(null);
}
}
//----------------------------------------------------------------------