Added two new config options to ChangeAppSettings.sh - disable depth buffer in OpenGL renderer and enable auto screen resizing

This commit is contained in:
pelya
2010-06-10 18:49:59 +03:00
parent b12b52db57
commit 647d3eefa9
7 changed files with 45 additions and 4 deletions

View File

@@ -18,6 +18,9 @@ class Globals {
// set this dir in jni/Android.mk in SDL_CURDIR_PATH
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
public static boolean DownloadToSdcard = false;
// Set this value to true if you're planning to render 3D using OpenGL - it eats some GFX resources, so disabled for 2D
public static boolean NeedDepthBuffer = false;
}
class LoadLibrary {

View File

@@ -19,6 +19,7 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import java.lang.Thread;
class DemoRenderer extends GLSurfaceView_SDL.Renderer {
@@ -41,6 +42,9 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer {
nativeInitJavaCallbacks();
// Make main thread priority lower so audio thread won't get underrun
// Thread.currentThread().setPriority((Thread.currentThread().getPriority() + Thread.MIN_PRIORITY)/2);
System.loadLibrary("application");
System.loadLibrary("sdl_main");
@@ -76,6 +80,7 @@ class DemoGLSurfaceView extends GLSurfaceView_SDL {
public DemoGLSurfaceView(Activity context) {
super(context);
mParent = context;
setEGLConfigChooser(Globals.NeedDepthBuffer);
accelerometer = new AccelerometerReader(context);
mRenderer = new DemoRenderer(context);
setRenderer(mRenderer);