Merge pull request #96525 from bruvzg/rem_gl_renderer_incl
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions

Store GLES over GL status in the OS to avoid direct renderer includes in the editor.
This commit is contained in:
Rémi Verschelde 2024-09-04 11:16:48 +02:00
commit 906a4e9db9
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 5 additions and 7 deletions

View File

@ -75,6 +75,7 @@ class OS {
int _display_driver_id = -1; int _display_driver_id = -1;
String _current_rendering_driver_name; String _current_rendering_driver_name;
String _current_rendering_method; String _current_rendering_method;
bool _is_gles_over_gl = false;
RemoteFilesystemClient default_rfs; RemoteFilesystemClient default_rfs;
@ -130,9 +131,11 @@ public:
void set_current_rendering_driver_name(const String &p_driver_name) { _current_rendering_driver_name = p_driver_name; } void set_current_rendering_driver_name(const String &p_driver_name) { _current_rendering_driver_name = p_driver_name; }
void set_current_rendering_method(const String &p_name) { _current_rendering_method = p_name; } void set_current_rendering_method(const String &p_name) { _current_rendering_method = p_name; }
void set_gles_over_gl(bool p_enabled) { _is_gles_over_gl = p_enabled; }
String get_current_rendering_driver_name() const { return _current_rendering_driver_name; } String get_current_rendering_driver_name() const { return _current_rendering_driver_name; }
String get_current_rendering_method() const { return _current_rendering_method; } String get_current_rendering_method() const { return _current_rendering_method; }
bool get_gles_over_gl() const { return _is_gles_over_gl; }
int get_display_driver_id() const { return _display_driver_id; } int get_display_driver_id() const { return _display_driver_id; }

View File

@ -113,6 +113,7 @@ public:
static void make_current(bool p_gles_over_gl) { static void make_current(bool p_gles_over_gl) {
gles_over_gl = p_gles_over_gl; gles_over_gl = p_gles_over_gl;
OS::get_singleton()->set_gles_over_gl(gles_over_gl);
_create_func = _create_current; _create_func = _create_current;
low_end = true; low_end = true;
} }

View File

@ -167,10 +167,6 @@
#include "modules/modules_enabled.gen.h" // For gdscript, mono. #include "modules/modules_enabled.gen.h" // For gdscript, mono.
#if defined(GLES3_ENABLED)
#include "drivers/gles3/rasterizer_gles3.h"
#endif
EditorNode *EditorNode::singleton = nullptr; EditorNode *EditorNode::singleton = nullptr;
static const String EDITOR_NODE_CONFIG_SECTION = "EditorNode"; static const String EDITOR_NODE_CONFIG_SECTION = "EditorNode";
@ -5062,18 +5058,16 @@ String EditorNode::_get_system_info() const {
driver_name = "Vulkan"; driver_name = "Vulkan";
} else if (driver_name == "d3d12") { } else if (driver_name == "d3d12") {
driver_name = "Direct3D 12"; driver_name = "Direct3D 12";
#if defined(GLES3_ENABLED)
} else if (driver_name == "opengl3_angle") { } else if (driver_name == "opengl3_angle") {
driver_name = "OpenGL ES 3/ANGLE"; driver_name = "OpenGL ES 3/ANGLE";
} else if (driver_name == "opengl3_es") { } else if (driver_name == "opengl3_es") {
driver_name = "OpenGL ES 3"; driver_name = "OpenGL ES 3";
} else if (driver_name == "opengl3") { } else if (driver_name == "opengl3") {
if (RasterizerGLES3::is_gles_over_gl()) { if (OS::get_singleton()->get_gles_over_gl()) {
driver_name = "OpenGL 3"; driver_name = "OpenGL 3";
} else { } else {
driver_name = "OpenGL ES 3"; driver_name = "OpenGL ES 3";
} }
#endif
} else if (driver_name == "metal") { } else if (driver_name == "metal") {
driver_name = "Metal"; driver_name = "Metal";
} }