Pārlūkot izejas kodu

- ANDROID Reverted a change in resolution setting, as it apparently has bad side effects on GUI
- Android texture util ENABLE_COMPRESSION is now public to be able to change it. Accessing it through the appSettings would be better.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9436 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

rem..om 13 gadi atpakaļ
vecāks
revīzija
0fe3b69f7d

+ 7 - 6
engine/src/android/com/jme3/app/AndroidHarness.java

@@ -134,8 +134,8 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
     protected OGLESContext ctx;
     protected OGLESContext ctx;
     protected GLSurfaceView view = null;
     protected GLSurfaceView view = null;
     protected boolean isGLThreadPaused = true;
     protected boolean isGLThreadPaused = true;
-    private ImageView splashImageView = null;
-    private FrameLayout frameLayout = null;
+    protected ImageView splashImageView = null;
+    protected FrameLayout frameLayout = null;
     final private String ESCAPE_EVENT = "TouchEscape";
     final private String ESCAPE_EVENT = "TouchEscape";
     private boolean firstDrawFrame = true;
     private boolean firstDrawFrame = true;
 
 
@@ -175,10 +175,11 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
             view = ctx.createView(eglConfigType, eglConfigVerboseLogging);
             view = ctx.createView(eglConfigType, eglConfigVerboseLogging);
 
 
             // Set the screen reolution
             // Set the screen reolution
-//            WindowManager wind = this.getWindowManager();
-//            Display disp = wind.getDefaultDisplay();
-//            logger.log(Level.WARNING, "Resolution from Window: {0}, {1}", new Object[]{disp.getWidth(), disp.getHeight()});
-//            ctx.getSettings().setResolution(disp.getWidth(), disp.getHeight());
+            //TODO try to find a better way to get a hand on the resolution
+            WindowManager wind = this.getWindowManager();
+            Display disp = wind.getDefaultDisplay();
+            logger.log(Level.WARNING, "Resolution from Window: {0}, {1}", new Object[]{disp.getWidth(), disp.getHeight()});
+            ctx.getSettings().setResolution(disp.getWidth(), disp.getHeight());
 
 
             // AndroidHarness wraps the app as a SystemListener.
             // AndroidHarness wraps the app as a SystemListener.
             ctx.setSystemListener(this);
             ctx.setSystemListener(this);

+ 2 - 1
engine/src/android/com/jme3/renderer/android/TextureUtil.java

@@ -19,7 +19,8 @@ public class TextureUtil {
 
 
     private static final Logger logger = Logger.getLogger(TextureUtil.class.getName());
     private static final Logger logger = Logger.getLogger(TextureUtil.class.getName());
     
     
-    private static boolean ENABLE_COMPRESSION = true;
+    //TODO Make this configurable through appSettings
+    public static boolean ENABLE_COMPRESSION = true;
     private static boolean NPOT = false;
     private static boolean NPOT = false;
     private static boolean ETC1support = false;
     private static boolean ETC1support = false;
     private static boolean DXT1 = false;
     private static boolean DXT1 = false;