Merge pull request #96525 from bruvzg/rem_gl_renderer_incl
Store GLES over GL status in the OS to avoid direct renderer includes in the editor.
This commit is contained in:
commit
906a4e9db9
|
@ -75,6 +75,7 @@ class OS {
|
|||
int _display_driver_id = -1;
|
||||
String _current_rendering_driver_name;
|
||||
String _current_rendering_method;
|
||||
bool _is_gles_over_gl = false;
|
||||
|
||||
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_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_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; }
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
|
||||
static void make_current(bool 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;
|
||||
low_end = true;
|
||||
}
|
||||
|
|
|
@ -167,10 +167,6 @@
|
|||
|
||||
#include "modules/modules_enabled.gen.h" // For gdscript, mono.
|
||||
|
||||
#if defined(GLES3_ENABLED)
|
||||
#include "drivers/gles3/rasterizer_gles3.h"
|
||||
#endif
|
||||
|
||||
EditorNode *EditorNode::singleton = nullptr;
|
||||
|
||||
static const String EDITOR_NODE_CONFIG_SECTION = "EditorNode";
|
||||
|
@ -5062,18 +5058,16 @@ String EditorNode::_get_system_info() const {
|
|||
driver_name = "Vulkan";
|
||||
} else if (driver_name == "d3d12") {
|
||||
driver_name = "Direct3D 12";
|
||||
#if defined(GLES3_ENABLED)
|
||||
} else if (driver_name == "opengl3_angle") {
|
||||
driver_name = "OpenGL ES 3/ANGLE";
|
||||
} else if (driver_name == "opengl3_es") {
|
||||
driver_name = "OpenGL ES 3";
|
||||
} else if (driver_name == "opengl3") {
|
||||
if (RasterizerGLES3::is_gles_over_gl()) {
|
||||
if (OS::get_singleton()->get_gles_over_gl()) {
|
||||
driver_name = "OpenGL 3";
|
||||
} else {
|
||||
driver_name = "OpenGL ES 3";
|
||||
}
|
||||
#endif
|
||||
} else if (driver_name == "metal") {
|
||||
driver_name = "Metal";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue