Disable incompatible rendering methods in the project manager

The project manager can now only create projects that use a rendering
method compatible with the current platform. Rendering methods that
are disabled at build-time are also grayed out (only for OpenGL).

While it is possible in theory to create a project using Forward+
on web (thanks to the automatic fallback),
it will look different once edited on a desktop platform.
This commit is contained in:
Hugo Locurcio
2023-01-31 17:23:59 +01:00
parent 8612c12be6
commit 8ebc5b2875
2 changed files with 20 additions and 3 deletions

View File

@@ -742,7 +742,16 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Last Edited,Name,Path")
#if defined(WEB_ENABLED)
// Web platform only supports `gl_compatibility`.
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "gl_compatibility", "forward_plus,mobile,gl_compatibility")
#elif defined(ANDROID_ENABLED)
// Use more suitable rendering method by default.
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "mobile", "forward_plus,mobile,gl_compatibility")
#else
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "forward_plus", "forward_plus,mobile,gl_compatibility")
#endif
if (p_extra_config.is_valid()) {
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {