-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback to OpenGL 3 if other rendering drivers are not supported #97142
Conversation
This might solve godotengine/godot-proposals#8006, but it should support all platforms, not just Windows. I support the idea in general, I think this is indeed needed to better handle users who don't support modern graphics APIs. |
I will try to do this for other platforms later |
Metal support is only available on Apple Silicon hardware, but most Intel Macs have Vulkan support through MoltenVK. That said, old Intel Macs can't run Vulkan through MoltenVK due to missing hardware features, so the Vulkan -> OpenGL fallback would still be needed on macOS. The same goes for iOS - old devices can't run Vulkan through MoltenVK either: #74227 |
Understood |
The code looks good, but when I test locally (with modifications to make I'm investigating further now. |
I figured out the issue, the fallback code wasn't setting the rendering_method, therefore, any calls to We don't use the current rendering method often, but we do check it when rendering to ensure that the opengl context is bound to the correct window: godot/servers/rendering/renderer_viewport.cpp Lines 261 to 264 in 694d3c2
In the editor, this code wouldn't get called. So the "loading" popup would take the openGL context and then not return it leading to the main screen never updating. So it wasn't a deadlock after all! The solution is to set the rendering_method at the same time that we set the driver:
|
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! The final step before merging is to squash all the commits together so that the whole PR only contains 1 big commit with all your changes. We like to merge one commit at a time to keep the git history clean and navigable.
If you don't know how to do that, we have a helpful tutorial in the official documentation https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html#the-interactive-rebase
Everything should be okay now I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks great! Thank you
Thanks! And congrats for your first merged Godot contribution 🎉 |
Add an option to allow renderer fall back to OpenGL 3 if Vulkan (and D3D12 on Windows, Metal on Apple devices) are not supported
Free players from using
--rendering-driver opengl3
manuallyFree developers from recieving "Why my game crashed with a message that I can't understand"
Bugsquad edit: