SDL2: Missing SDL_RenderGeometry?

I couldn’t find this SDL function in the SDL2 vendored library: SDL2/SDL_RenderGeometry - SDL Wiki. Am I missing something?

Nevermind. Seems like Odin only includes SDL 2.0.16 while SDL_RenderGeometry was added in SDL 2.0.18. Will it be updated?

One of the main reasons SDL is not using the latest version is to be compatible with many of the Linux distros that don’t have the latest version in their package managers. We might update it to the latest when SDL3 is released in a few days, since SDL2 will then be a “legacy” version.

This also means I need to write the SDL3 bindings very soon ready for the release.

4 Likes

How about create something like “since(2.0.18)” on bindings ?

foreign mylib since("2.0.18") { 
 // proc that is new to 2.0.18
}
foreign mylib  { 
 // older procs 
}

How would you check at compile time for the version of the DLL which is loaded in at runtime?

Check at compile time the shared-object version that is on machine.

  • on arch and other rolling release you will get the latest shared-object
  • on ubuntu you will get 6 moth time frame release
  • on debian you will get old version

And the debian user can just compile the last library if s/he choose to do so
if you want to accommodate all linux distro, these is the way to go.

But maybe it is difficult to get the version of that lib on compile time, sorry if it make no sense.