Merge pull request #54992 from RandomShaper/drop_android_db_setting

This commit is contained in:
Rémi Verschelde 2021-11-15 17:54:23 +01:00 committed by GitHub
commit 6715bc7754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 32 deletions

View file

@ -1667,7 +1667,6 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, launcher_adaptive_icon_foreground_option, PROPERTY_HINT_FILE, "*.png"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, launcher_adaptive_icon_background_option, PROPERTY_HINT_FILE, "*.png"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "graphics/depth_buffer_bits", PROPERTY_HINT_ENUM, "16 bits,24 bits [default],32 bits"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/opengl_debug"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,Oculus Mobile VR"), 0));
@ -2209,12 +2208,6 @@ void EditorExportPlatformAndroid::get_command_line_flags(const Ref<EditorExportP
command_line_strings.push_back("--xr_mode_regular");
}
int depth_buffer_bits_index = p_preset->get("graphics/depth_buffer_bits");
if (depth_buffer_bits_index >= 0 && depth_buffer_bits_index <= 2) {
int depth_buffer_bits = 16 + depth_buffer_bits_index * 8;
command_line_strings.push_back(vformat("--use_depth=%d", depth_buffer_bits));
}
bool immersive = p_preset->get("screen/immersive_mode");
if (immersive) {
command_line_strings.push_back("--use_immersive");

View file

@ -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")) {

View file

@ -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;
}

View file

@ -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[] {