summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/wayland/display_server_wayland.cpp5
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp
index 0a87c4a517..d5271f9ad4 100644
--- a/platform/linuxbsd/wayland/display_server_wayland.cpp
+++ b/platform/linuxbsd/wayland/display_server_wayland.cpp
@@ -1356,13 +1356,16 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
if (rendering_context->initialize() != OK) {
memdelete(rendering_context);
rendering_context = nullptr;
+#if defined(GLES3_ENABLED)
bool fallback_to_opengl3 = GLOBAL_GET("rendering/rendering_device/fallback_to_opengl3");
if (fallback_to_opengl3 && rendering_driver != "opengl3") {
WARN_PRINT("Your video card drivers seem not to support the required Vulkan version, switching to OpenGL 3.");
rendering_driver = "opengl3";
OS::get_singleton()->set_current_rendering_method("gl_compatibility");
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver);
- } else {
+ } else
+#endif // GLES3_ENABLED
+ {
r_error = ERR_CANT_CREATE;
if (p_rendering_driver == "vulkan") {
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index f1be5d83dc..48ff06cad2 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -6168,13 +6168,16 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
if (rendering_context->initialize() != OK) {
memdelete(rendering_context);
rendering_context = nullptr;
+#if defined(GLES3_ENABLED)
bool fallback_to_opengl3 = GLOBAL_GET("rendering/rendering_device/fallback_to_opengl3");
if (fallback_to_opengl3 && rendering_driver != "opengl3") {
WARN_PRINT("Your video card drivers seem not to support the required Vulkan version, switching to OpenGL 3.");
rendering_driver = "opengl3";
OS::get_singleton()->set_current_rendering_method("gl_compatibility");
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver);
- } else {
+ } else
+#endif // GLES3_ENABLED
+ {
r_error = ERR_CANT_CREATE;
if (p_rendering_driver == "vulkan") {