Added SDL_gpu backend but maybe do not merge? #7998
+1,085
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: