From c1c9fc871a82c1e65ba8eb0ab6f639b4f80d8667 Mon Sep 17 00:00:00 2001 From: "iwg..ic" Date: Tue, 1 Oct 2013 16:33:43 +0000 Subject: [PATCH] Add alpha bits to AppSettings. Currently only to be used for Android EGL config choosing. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10809 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/core/com/jme3/system/AppSettings.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/engine/src/core/com/jme3/system/AppSettings.java b/engine/src/core/com/jme3/system/AppSettings.java index 81ca315ee..d06211671 100644 --- a/engine/src/core/com/jme3/system/AppSettings.java +++ b/engine/src/core/com/jme3/system/AppSettings.java @@ -619,6 +619,25 @@ public final class AppSettings extends HashMap { putInteger("DepthBits", value); } + /** + * Android Only + * Sets the number of alpha bits to use. + *

+ * The number of alpha bits specifies the precision of the surface view + * background alpha value. To set the surface view to opaque (fastest setting), + * leave the number of alpha bits = 0. This will cause faster rendering, + * but android views located behind the surface view will not be viewable. + * To set the surface view to translucent, set the number of alphaBits to 8 + * or higher. Values less than 8 (except 0) will set the surface view pixel + * format to transparent.

+ * (Default: 0) + * + * @param value The alpha bits + */ + public void setAlphaBits(int value){ + putInteger("AlphaBits", value); + } + /** * Set the number of stencil bits. *

@@ -807,6 +826,15 @@ public final class AppSettings extends HashMap { return getInteger("DepthBits"); } + /** + * Android Only + * Get the number of alpha bits for the surface view to use. + * @see #setAlphaBits(int) + */ + public int getAlphaBits() { + return getInteger("AlphaBits"); + } + /** * Get the number of stencil bits * @see #setStencilBits(int)