-
Notifications
You must be signed in to change notification settings - Fork 7
SDL3 GPU examples #21
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
Conversation
120c6a8
to
bc9ab4b
Compare
Thank you so much for your hard work! |
28abbfe
to
df7ff92
Compare
I figured out you can force Direct3D 12 using If I load the newest version of SDL3 though, it seems to work well on both Windows natively and Linux using VKD3D |
Interesting, do you know what version exactly? |
I was able to finish porting the rest. I'll look into separating the commits tomorrow. I was able to find another issue which I was also having with my project. |
I was able to figure out the issue. Purego-gen should cast bool Purego does this: https://github.com/ebitengine/purego/blob/9059adfae616e486aa4145d6f4d5fefaa1b47a61/func.go#L343 Could you update it or would you like me to make a PR? |
Good catch, I fixed and re-generated all functions in latest commit |
What do you want to separate? Please don't go into too much a hassle, unless you're okay haha About the shaders, images, code and so-on I think we should refer to the original LICENSE somewhere also, right? |
f7d01f4
to
d3eb34a
Compare
Ah, no worries. I updated this branch with current main and dropped my commits that you recently added. It should be merge-able. I think it's ready? I'll see if I can test it some more on different platforms and such, but this has been quite extensive in making sure SDL GPU works well. I have a few ideas for how we could improve the API but I think it might be best if I mess around first before proposing it in a new PR sometime later. The API is already very verbose as it's just thin Vulkan, so it's not surprising The only other non-example related changes are in |
Thank you, I'll take a look tomorrow! |
Yeah, it would be great if we could abstract away the requirements for unsafe.Slice and unsafe.Sizeof later somehow |
Everything runs well for me on Windows, and both vulkan and dx12 give the same results edit: Tested on linux too and worked well👌 |
That's good. The only thing I've noticed is that the I also don't like placing a second Thanks for merging and working so hard on the bindings |
I'm happy that we have so many gpu examples, GPU is actually the part of the API that got me to create these bindings in the first place, so thanks to you 🥳
Yeah, that's the only thing I wasn't sure about, I considered doing the same for the tools under /cmd which might be okay in this case actually. For example https://github.com/hajimehoshi/ebiten/tree/main/examples doesn't have its own go.mod and has custom dependencies only imported by there ("github.com/gen2brain/mpeg", "github.com/jakecoffman/cp/v2") We can always revert this (the independent go module part) if we feel like it, I don't have a strong opinion so let me know |
Yeah, I don't think there's anything we can do on our end about that, beside creating an issue on the official repo |
Using examples from https://github.com/TheSpydog/SDL_gpu_examples
They're pretty good. Will see if I can test Windows and macOS
Also #20 is merged in this PR