summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-09-27 01:07:10 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-10-30 02:05:49 +0200
commitce97ddbcb125228cc88fbfdcae932e110ee7daee (patch)
treef3e2f17be75973806d6f468826e0232cf35b247a /editor
parente3491a37445014cc3527d6f2c1467063222b2dd8 (diff)
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver` command line argument.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp20
-rw-r--r--editor/editor_node.cpp11
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp2
5 files changed, 15 insertions, 22 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 4909ac7a3f..bc4d9fb156 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1491,15 +1491,15 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
-// String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
-// bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
-// bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
+ // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
+ // bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
+ // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
- if (driver == "GLES2" && !etc_supported) {
- return TTR("Target platform requires 'ETC' texture compression for GLES2. Enable 'Import Etc' in Project Settings.");
+ if (driver == "OpenGL" && !etc_supported) {
+ return TTR("Target platform requires 'ETC' texture compression for OpenGL. Enable 'Import Etc' in Project Settings.");
} else if (driver == "Vulkan" && !etc2_supported) {
// FIXME: Review if this is true for Vulkan.
return TTR("Target platform requires 'ETC2' texture compression for Vulkan. Enable 'Import Etc 2' in Project Settings.");
@@ -1511,12 +1511,12 @@ String EditorExportPlatform::test_etc2_or_pvrtc() const {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
-// String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
-// bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
-// bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
+ // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
+ // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
+ // bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
- if (driver == "GLES2" && !pvrtc_supported) {
- return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings.");
+ if (driver == "OpenGL" && !pvrtc_supported) {
+ return TTR("Target platform requires 'PVRTC' texture compression for OpenGL. Enable 'Import Pvrtc' in Project Settings.");
} else if (driver == "Vulkan" && !etc2_supported && !pvrtc_supported) {
// FIXME: Review if this is true for Vulkan.
return TTR("Target platform requires 'ETC2' or 'PVRTC' texture compression for Vulkan. Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings.");
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9e84718fb7..d3d055a009 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5596,14 +5596,9 @@ void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) {
}
void EditorNode::_update_rendering_driver_color() {
- // TODO: Probably should de-hardcode this and add to editor settings.
- // if (video_driver->get_text() == "GLES2") {
- // video_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
- // } else if (video_driver->get_text() == "Vulkan") {
- // video_driver->add_theme_color_override("font_color", theme_base->get_theme_color(SNAME("vulkan_color"), SNAME("Editor")));
- if (rendering_driver->get_text() == "GLES2") {
+ if (rendering_driver->get_text() == "opengl") {
rendering_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
- } else if (rendering_driver->get_text() == "Vulkan") {
+ } else if (rendering_driver->get_text() == "vulkan") {
rendering_driver->add_theme_color_override("font_color", theme_base->get_theme_color("vulkan_color", "Editor"));
}
}
@@ -6652,8 +6647,6 @@ EditorNode::EditorNode() {
rendering_driver->add_theme_font_override("font", gui_base->get_theme_font("bold", "EditorFonts"));
rendering_driver->add_theme_font_size_override("font_size", gui_base->get_theme_font_size("bold_size", "EditorFonts"));
- // TODO re-enable when GLES2 is ported
- // video_driver->set_disabled(true);
right_menu_hb->add_child(rendering_driver);
// only display the render drivers that are available for this display driver
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 84992892a4..b99ccc1012 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -4376,7 +4376,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
const int wireframe_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME);
const int overdraw_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_OVERDRAW);
const int shadeless_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_SHADELESS);
- const String unsupported_tooltip = TTR("Not available when using the GLES2 renderer.");
+ const String unsupported_tooltip = TTR("Not available when using the OpenGL renderer.");
view_menu->get_popup()->set_item_disabled(normal_idx, true);
view_menu->get_popup()->set_item_tooltip(normal_idx, unsupported_tooltip);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 6d023b8a7d..2bd99debed 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1246,7 +1246,7 @@ void VisualShaderEditor::_update_options_menu() {
Color unsupported_color = get_theme_color(SNAME("error_color"), SNAME("Editor"));
Color supported_color = get_theme_color(SNAME("warning_color"), SNAME("Editor"));
- static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES2";
+ static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "opengl";
Map<String, TreeItem *> folders;
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 2adcbe69d6..8d14fa899e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -478,7 +478,7 @@ private:
if (rasterizer_button_group->get_pressed_button()->get_meta("driver_name") == "Vulkan") {
initial_settings["rendering/driver/driver_name"] = "Vulkan";
} else {
- initial_settings["rendering/driver/driver_name"] = "GLES2";
+ initial_settings["rendering/driver/driver_name"] = "OpenGL";
initial_settings["rendering/textures/vram_compression/import_etc2"] = false;
initial_settings["rendering/textures/vram_compression/import_etc"] = true;
}