mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fallback to OpenGL 3 if Vulkan isn't available on Wayland
This commit is contained in:
parent
621cadcf65
commit
c4e4810e93
@ -1344,6 +1344,13 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
if (rendering_context->initialize() != OK) {
|
||||
memdelete(rendering_context);
|
||||
rendering_context = nullptr;
|
||||
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 {
|
||||
r_error = ERR_CANT_CREATE;
|
||||
|
||||
if (p_rendering_driver == "vulkan") {
|
||||
@ -1359,6 +1366,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
|
||||
ERR_FAIL_MSG(vformat("Could not initialize %s", rendering_driver));
|
||||
}
|
||||
}
|
||||
|
||||
driver_found = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user