Its not free of bugs, but its a starting point. Pull requests are welcome.
Also all the sdl-c library functions are stripped in favor of the c.libc
package
Its not free of bugs, but its a starting point. Pull requests are welcome.
Also all the sdl-c library functions are stripped in favor of the c.libc
package
I tried to build the main.odin file but there were some issues.
There is no check for loading a lib file when OS is Windows so I had to add that in (I created the lib from the dll using ālibā in dev cmd prompt, maybe I screwed something up).
In the main file, CreateGPUDevice requires GPUShaderFormat as an argument which is only present as an u32 when it should be a bit_set. I added those in and then it did build but running it didnāt open a window so I donāt think itās working, Iāll have to investigate further.
The enum fields have redundant names like PropertyType.PROPERTY_TYPE_INVALID instead of PropertyType.INVALID. I get itās probably to be consistent with the original api but vendor:sdl2 doesnāt do this. Would it maybe be a good idea to keep it consistent with that instead?
Btw, why arenāt you using c types like c.uint instead of u32? I realize those are just aliases but it should be easier to avoid bugs with them. Is it to avoid importing a package?
Anyway, Iām not saying you need to fix these things. Maybe Iāll make a PR once I get all the issues sorted out, but that might take a while. I want to take my time and make sure that itās mostly functional. Thanks for doing the bulk of the work by the way, it really helps!
You are absolutely correct. I can make the bindings in odin-style like the sdl2 package. I should and I would. Help is appriciated.
And also as I use linux, Ive just made the linux port. Other platform support has to be added.
For SDL3, weāll support official bindings when it is officially released, which I believe is January 15.
Since it is not officially released yet, just āABI stableā, I will not post the bindings yet.
Nice! Iāll still try to get it work on my end just as a learning experience, but Iām glad it will be officially supported.
@gingerBill today is the day and SDL3 is finally released. The inpatient child in me canāt wait to start to use it with Odin in my next project. Any ideas when it could be possible.
Sorry for the impatience
Since it is SDL3 and not 2, I suggest to postpone the release until March
You can watch the progress on the sdl3 branch of Odin on Github, if you want:
Looks like Bill is hard at work, so I just wouldnāt push at all. I also think this is one of those cases where it makes more sense for one person to do the work. Testing, on the other hand, is where The Many can shine.
hi, iāve added the vendor bindings to the sdl docs: Simple DirectMedia Layer - Language Bindings. thanks for the hard work! @gingerBill
Does someone know how can I use sd3/ttf?