Skip to content

Releases: BindBC/bindbc-sdl

[2.0.0-prerelease] SDL 3.1.3 support

02 Nov 11:01
Compare
Choose a tag to compare
Pre-release

BindBC-SDL 2.0.0 Pre-Release 1

Here's the first preview of bindings to SDL3. Please test it at your leisure and report any issues you may encounter.

What not to expect

API compatibility

This release will NOT be fully API-compatible with BindBC-SDL 2.0.0 or future pre-releases. SDL3 is has only reached stable a ABI—not stable API. Also note that in the long-run this release tag might be invalidated by commit-squashing in order to preserve a smaller git repository size, so do not rely on this tag existing indefinitely. If you are working on a project, feel free to migrate now but be prepared to change some of your code later.

SDL_image, _mixer, etc.

None of the 'satellite' libraries have 3.0 previews available as of yet, so currently they are just dummied out until I can be sure of how to update their bindings. Sorry about that.

What's next

The moment I was done with this release SDL 3.1.6 came out, so that's what I'll be working on next. It is not API-compatible, so there will be some API breaking changes in v2.0.0-prerelease.2. This is the danger with using unreleased software!

[1.4.2] SDL 2.28.X support

05 Jul 18:59
Compare
Choose a tag to compare

BindBC-SDL 1.4.2

This is a small update to give BindBC-SDL support for SDL 2.28.X.

Upcoming plans

When SDL 3.0 is released, I plan to save an "SDL2" fork of the repository, and then change bindbc-sdl~master into brand new bindings to SDL3. These new bindings will begin from bindbc-sdl 2.0.0, and have a more D-styled API. This way, I don't have to maintain SDL2 and SDL3 support at the same time in one library, and the bindings should be nicer to use overall. :)

[1.3.0] Updated SDL_* support, new backend

27 Feb 14:44
e90e927
Compare
Choose a tag to compare

BindBC-SDL 1.3.0

The newest update to BindBC-SDL includes a lot of internal changes, and updates every SDL_* library's support to the latest version.

Once SDL3 comes out, I plan to evaluate whether older versions of SDL still need to be supported. This will be highly dependant on the nature of SDL3's API changes. It might be better for me to make a "BindBC-SDL3".

Breaking changes

A great deal of care has gone into keeping the number of user-side breaking changes as low as possible for this release. However, there are a few notable breaking changes:

  • sdl[*]Support variables (sdlSupport, sdlImageSupport, sdlTTFSupport, etc.) and SDL[*]Support enums now use SDL_version instead of numeric values. For now, noLibrary and badLibrary are still part of the SDL[*]Support enum, but I have tentative plans to separate them into a bindbc.loader.LibError enum in BindBC-SDL 2.0.
  • loadedSDL[*]Version now return the compile-time-linked version of the SDL_* library (the same as SDL[_*]_VERSION & sdl[*]Support), rather than an approximation of the dynamically-linked version of the SDL_* library. To see the dynamically-linked version, please use SDL_GetVersion, IMG_Linked_Version, Mix_Linked_Version, SDLNet_Linked_Version or TTF_Linked_Version for the respective SDL_* libraries instead.
  • Version identifiers BindSDL_Image, BindSDL_Mixer, BindSDL_Net and BindSDL_TTF no longer work. As far as I know they were only ever intended for internal use, but I've seen some people using them (rather than the deprecated variants without the Bind prefix) in the wild.
  • SDL_[SomeEnumType].[someEnumTypeMember] will no longer work because all enum types are now type aliases. Use just [someEnumTypeMember] instead.
  • SDL_net functions use always use TCPsocket and UDPsocket, instead of sometimes replacing them with void*.
  • Dynamic function bindings no longer expose function pointers (except for bindings to variadic functions, but this may change in the future). For example, auto x = SDL_Init; will now call SDL_Init and will make typeof(x) be int instead of int function(uint). If you relied on getting references this way in your code, please use use the address-of operator (&) instead. (e.g. auto x = &SDL_Init;) This also means that if your code manually set the function pointers (i.e. SDL_Init = &myFn;) then it will no longer work.
  • Dynamic bindings' type aliases (e.g. pSDL_Init) no longer exist.
  • All internal SDL binding files are now in sdl.* instead of bindbc.sdl.bind.*. This should not affect users who were using the library as-intended, and it is still strongly discouraged for you to directly import sdl.* instead of importing bindbc.sdl.
  • Fixed the signature of SDL_IntersectFRectAndLine by changing the int positions to floats.
  • Fixed the signature of SDL_HintCallback by adding the missing const(char)* parameter at the end.
  • SDL_CompilerBarrier, SDL_MemoryBarrierRelease and SDL_MemoryBarrierAcquire are no longer aliases to core.atomic.atomicFence!().

Other changes

  • Support for SDL 2.26.X and 2.24.X.
  • Support for SDL_image 2.6.X.
  • Support for SDL_net 2.2.X.
  • Support for SDL_ttf 2.20.X.
  • Added many previously missing functions to sdl.stdinc.
  • Added deprecation warnings to functions officially deprecated by libsdl.org.
  • Deprecated templates that were based on #defines. You can now use the CTFE-able function-equivalents instead.
  • Deprecated versionless SDL_* library version identifiers. (e.g. SDL_Mixer, SDL_TTF, etc.) Please use library version identifiers with versions instead. (e.g. SDL_Mixer_200, SDL_TTF_2012, etc.) Support for the old library version identifiers will be removed in BindBC-SDL version 2.0.
  • Deprecated SDL[*]Support.sdl[version] enum members (e.g. SDLImageSupport.sdlImage205) in favour of SDL[*]Support.v[version]. (e.g. SDLImageSupport.v2_0_5) The old members will be removed in BindBC-SDL version 2.0.
  • Added a deprecation warning to expandEnum, which I plan to move into another library. Possibly BindBC-Loader.
  • Added non-American English aliases for most relevant symbols. (e.g. SDL_SetRenderDrawColorSDL_SetRenderDrawColour, etc.)
  • New readme!

[1.2.4] Updated SDL Mixer bindings to support 2.6.0

14 Dec 09:20
Compare
Choose a tag to compare