diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 09:58:46 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 09:58:46 +0200 |
commit | a0d17380fd562468c5caed8695f7752cd99ca38a (patch) | |
tree | 242e62808de00b8e98c3af5b83db1fcd46d5fc93 /main/main.cpp | |
parent | d0cc7cf192d41dc2dcb8db595d246785140f79a1 (diff) | |
parent | a09bb9037e0c226e2b81d4fdd9b1ba68479b7af8 (diff) |
Merge pull request #66637 from clayjohn/mobile-renderer
Use mobile as the default rendering method on mobile when Vulkan is supported
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index aac77c1625..28a73ce585 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -710,6 +710,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph bool force_res = false; String default_renderer = ""; + String default_renderer_mobile = ""; String renderer_hints = ""; packed_data = PackedData::get_singleton(); @@ -1517,6 +1518,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // Start with RenderingDevice-based backends. Should be included if any RD driver present. #ifdef VULKAN_ENABLED renderer_hints = "forward_plus,mobile"; + default_renderer_mobile = "mobile"; #endif // And Compatibility next, or first if Vulkan is disabled. @@ -1525,6 +1527,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph renderer_hints += ","; } renderer_hints += "gl_compatibility"; + if (default_renderer_mobile.is_empty()) { + default_renderer_mobile = "gl_compatibility"; + } #endif if (renderer_hints.is_empty()) { ERR_PRINT("No renderers available."); @@ -1616,7 +1621,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph default_renderer = renderer_hints.get_slice(",", 0); GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method", default_renderer); - GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer); + GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer_mobile); GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.web", "gl_compatibility"); // This is a bit of a hack until we have WebGPU support. ProjectSettings::get_singleton()->set_custom_property_info("rendering/renderer/rendering_method", |