diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-15 17:54:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 17:54:23 +0100 |
commit | 6715bc7754ccaed7fdd3fa383a4ba92b9bbdf551 (patch) | |
tree | d2a2ca0d79c543331fc3490a5d426070d3189971 | |
parent | c24c7cac5752dd4ccf5d183a1e5c0609eea27bb2 (diff) | |
parent | cab870e9d3276a6bfae8555d0db28de92f839444 (diff) |
Merge pull request #54992 from RandomShaper/drop_android_db_setting
4 files changed, 7 insertions, 32 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 4c45be5210..18e9e20948 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -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"); diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java index d872d5ed8a..b6476fa61a 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java @@ -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")) { diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java index 8b77302491..088b048502 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java @@ -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; } diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java b/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java index 0d581785ab..09820fad5f 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java @@ -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[] { |