You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Drop pointless Android depth buffer setting
This commit is contained in:
@@ -119,7 +119,6 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||
private Button mWiFiSettingsButton;
|
||||
|
||||
private XRMode xrMode = XRMode.REGULAR;
|
||||
private int depth_buffer_bits = 24;
|
||||
private boolean use_immersive = false;
|
||||
private boolean use_debug_opengl = false;
|
||||
private boolean mStatePaused;
|
||||
@@ -266,8 +265,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||
if (videoDriver.equals("vulkan")) {
|
||||
mRenderView = new GodotVulkanRenderView(activity, this);
|
||||
} else {
|
||||
mRenderView = new GodotGLRenderView(activity, this, xrMode, depth_buffer_bits,
|
||||
use_debug_opengl);
|
||||
mRenderView = new GodotGLRenderView(activity, this, xrMode, use_debug_opengl);
|
||||
}
|
||||
|
||||
View view = mRenderView.getView();
|
||||
@@ -506,12 +504,6 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||
xrMode = XRMode.REGULAR;
|
||||
} else if (command_line[i].equals(XRMode.OVR.cmdLineArg)) {
|
||||
xrMode = XRMode.OVR;
|
||||
} else if (command_line[i].startsWith("--use_depth=")) {
|
||||
try {
|
||||
depth_buffer_bits = Integer.parseInt(command_line[i].split("=")[1]);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (command_line[i].equals("--debug_opengl")) {
|
||||
use_debug_opengl = true;
|
||||
} else if (command_line[i].equals("--use_immersive")) {
|
||||
|
||||
@@ -78,10 +78,8 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
|
||||
private final GodotRenderer godotRenderer;
|
||||
private PointerIcon pointerIcon;
|
||||
|
||||
public GodotGLRenderView(Context context, Godot godot, XRMode xrMode, int p_depth_buffer_bits,
|
||||
boolean p_use_debug_opengl) {
|
||||
public GodotGLRenderView(Context context, Godot godot, XRMode xrMode, boolean p_use_debug_opengl) {
|
||||
super(context);
|
||||
GLUtils.depth_buffer_bits = p_depth_buffer_bits;
|
||||
GLUtils.use_debug_opengl = p_use_debug_opengl;
|
||||
|
||||
this.godot = godot;
|
||||
@@ -91,7 +89,7 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
pointerIcon = PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_DEFAULT);
|
||||
}
|
||||
init(xrMode, false, 16, 0);
|
||||
init(xrMode, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -172,7 +170,7 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
|
||||
return pointerIcon;
|
||||
}
|
||||
|
||||
private void init(XRMode xrMode, boolean translucent, int depth, int stencil) {
|
||||
private void init(XRMode xrMode, boolean translucent) {
|
||||
setPreserveEGLContextOnPause(true);
|
||||
setFocusableInTouchMode(true);
|
||||
switch (xrMode) {
|
||||
@@ -209,16 +207,9 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
|
||||
* below.
|
||||
*/
|
||||
|
||||
RegularConfigChooser configChooser =
|
||||
new RegularFallbackConfigChooser(8, 8, 8, 8, 16, stencil,
|
||||
new RegularConfigChooser(5, 6, 5, 0, 16, stencil));
|
||||
if (GLUtils.depth_buffer_bits >= 24) {
|
||||
configChooser = new RegularFallbackConfigChooser(8, 8, 8, 8, 24, stencil, configChooser);
|
||||
if (GLUtils.depth_buffer_bits >= 32) {
|
||||
configChooser = new RegularFallbackConfigChooser(8, 8, 8, 8, 32, stencil, configChooser);
|
||||
}
|
||||
}
|
||||
setEGLConfigChooser(configChooser);
|
||||
setEGLConfigChooser(
|
||||
new RegularFallbackConfigChooser(8, 8, 8, 8, 24, 0,
|
||||
new RegularConfigChooser(8, 8, 8, 8, 16, 0)));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ public class GLUtils {
|
||||
|
||||
public static final boolean DEBUG = false;
|
||||
|
||||
public static int depth_buffer_bits; // No need to reiterate the default here
|
||||
public static boolean use_debug_opengl = false;
|
||||
|
||||
private static final String[] ATTRIBUTES_NAMES = new String[] {
|
||||
|
||||
Reference in New Issue
Block a user