-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Added SDL_gpu backend but maybe do not merge? #7998
base: docking
Are you sure you want to change the base?
Conversation
Thank you. Linking to #7988. Some quick feedback:
|
Aa nice I had not even noticed the #7988 issue haha. True I will fix the other stuff later after work =) |
pushed fixes for the feedback and an untested example 😅 |
Thank you! I should be honest, the most important thing I am looking for in a PR is trust that things are done with extreme amount of care. Untested stuff and miscellaneous changes that are not explained (e.g. changes to files in vulkan/ folder) are unfortunately effectively the best way to get me to not look at a PR in a timely manner. I realize you suggested "maybe do not merge" so this could be intended as a reference only. Even unfinished/unmerged PR are useful when it comes to eventually get feature in. But if the intent is to be eventually merged it's always better when things are done neatly :) |
Yea. The PR was just intended for reference on my part/show how I did it so feel free to reject. And I did it in one day without much though as well so that is why I was a bit hesitant at first but thought that it could serve as a reference at least =) |
Thank you! |
Added SDL_gpu support.. though because SDL3 and SDL_gpu are new and they are changing the API quite often then it might not be good to merge to docking.. maybe a new branch? So feel free to reject if this is wrong 😅 .
Made this pull request to just get the ball rolling. Working on my project that does not use that much ImGui stuff so I dont know how much is working haha. I do know ImageButton works at least. Mostly modified from imgui_impl_vulkan and sdlrenderer3 backends. I got an issue with Y being flipped that I fixed with changing the scale and translation uniform. The shaders are changed to use uniform buffer instead of push constant and the texture is on set 2 instead of 0. I guess that is how SDL_gpu wants it? and my code formatter did a number on the formatting of the code haha 😅
Tested on Linux and with Vulkan. I have the shaders compiled only for vulkan so if D3D or others then you need to compile them for those sdl drivers.
Just wanted to share my implementation.. so if this is already in the works or if it is ugly just reject haha.
I don't think I will be actively maintaining it as well soo yea merge or use at your own risk I guess haha.
Edit: Aa just noticed the formatting guide in the pulll request doc.. so will fix that at least soonish
How to use: