Option in Android export to use 32 bits buffer.
This commit is contained in:
parent
33f24df786
commit
3920c497b3
4 changed files with 32 additions and 268 deletions
|
|
@ -109,6 +109,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
private Button mPauseButton;
|
||||
private Button mWiFiSettingsButton;
|
||||
|
||||
private boolean use_32_bits=false;
|
||||
private boolean mStatePaused;
|
||||
private int mState;
|
||||
|
||||
|
|
@ -255,7 +256,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
// ...add to FrameLayout
|
||||
layout.addView(edittext);
|
||||
|
||||
mView = new GodotView(getApplication(),io,use_gl2, this);
|
||||
mView = new GodotView(getApplication(),io,use_gl2,use_32_bits, this);
|
||||
layout.addView(mView,new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
|
||||
mView.setKeepScreenOn(true);
|
||||
|
||||
|
|
@ -399,7 +400,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
for(int i=0;i<command_line.length;i++) {
|
||||
|
||||
boolean has_extra = i< command_line.length -1;
|
||||
if (command_line[i].equals("-use_apk_expansion")) {
|
||||
if (command_line[i].equals("-use_depth_32")) {
|
||||
use_32_bits=true;
|
||||
} else if (command_line[i].equals("-use_apk_expansion")) {
|
||||
use_apk_expansion=true;
|
||||
} else if (has_extra && command_line[i].equals("-apk_expansion_md5")) {
|
||||
main_pack_md5=command_line[i+1];
|
||||
|
|
|
|||
|
|
@ -71,14 +71,16 @@ public class GodotView extends GLSurfaceView {
|
|||
private static GodotIO io;
|
||||
private static boolean firsttime=true;
|
||||
private static boolean use_gl2=false;
|
||||
private static boolean use_32=false;
|
||||
|
||||
private Godot activity;
|
||||
|
||||
public GodotView(Context context,GodotIO p_io,boolean p_use_gl2, Godot p_activity) {
|
||||
public GodotView(Context context,GodotIO p_io,boolean p_use_gl2, boolean p_use_32_bits, Godot p_activity) {
|
||||
super(context);
|
||||
ctx=context;
|
||||
io=p_io;
|
||||
use_gl2=p_use_gl2;
|
||||
use_32=p_use_32_bits;
|
||||
|
||||
activity = p_activity;
|
||||
|
||||
|
|
@ -366,9 +368,17 @@ public class GodotView extends GLSurfaceView {
|
|||
* custom config chooser. See ConfigChooser class definition
|
||||
* below.
|
||||
*/
|
||||
setEGLConfigChooser( translucent ?
|
||||
new ConfigChooser(8, 8, 8, 8, depth, stencil) :
|
||||
new ConfigChooser(5, 6, 5, 0, depth, stencil) );
|
||||
|
||||
if (use_32) {
|
||||
setEGLConfigChooser( translucent ?
|
||||
new ConfigChooser(8, 8, 8, 8, 24, stencil) :
|
||||
new ConfigChooser(8, 8, 8, 8, 24, stencil) );
|
||||
|
||||
} else {
|
||||
setEGLConfigChooser( translucent ?
|
||||
new ConfigChooser(8, 8, 8, 8, 16, stencil) :
|
||||
new ConfigChooser(5, 6, 5, 0, 16, stencil) );
|
||||
}
|
||||
|
||||
/* Set the renderer responsible for frame rendering */
|
||||
setRenderer(new Renderer());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue