I received a message from Eduard Llamosí about SDL3 bindings he has generated.
It’s good to have, I’ve not tested them.
The source contains the examples already, doh!
I received a message from Eduard Llamosí about SDL3 bindings he has generated.
It’s good to have, I’ve not tested them.
The source contains the examples already, doh!
Ok, I just confirmed that this is an entirely AI generated binding based off SDLAda and for now, it’ll make a decent enough stop gap.
Why not use the gcc binding generator for this? I’ve only had to change less than 4 lines to get up and running with a window using that method.
To make them nice and useable without dragging in every C header as a package, i.e. types.h, stdarg.h you have to edit a lot and for complex pointers, all you get is system.address. Also, I didn’t make this, someone else put my SDLAda into AI and generated SDL3 bindings.
I haven’t build sdl bindings using that method but there are some C/C++ quirks that the bindings generator can’t handle and that would have to be fixed by hand.
From what I have read and the few times I used it, the bindings generator is good enough to create thin bindings (while taking the C/C++ quirks into account manually). From there it’s actually quite easy to build thick bindings translating “C/C++ conventions“ to Ada.
For my current project I used the bindings generator to “translate“ all the definitons for a calculator screen. However, definitions like `#define COLOR_YELLOWGREEN (color_t)0x9E66` were not translated. I had to manually define a color record and translate all of the hex values to the custom color record.
I haven’t programmed using SDL in a while but I can imagine that there are some problems with the automatic binding generator. Manual intervention is still needed to fix that.
I didn’t do it, someone else put my hand written bindings into ai and got it to use that as a template for sdl3. I intend to generate thin bindings with a generator.