Releases: BindBC/bindbc-sdl
[2.0.0-prerelease] SDL 3.1.3 support
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
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
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.) andSDL[*]Support
enums now useSDL_version
instead of numeric values. For now,noLibrary
andbadLibrary
are still part of theSDL[*]Support
enum, but I have tentative plans to separate them into abindbc.loader.LibError
enum in BindBC-SDL 2.0.loadedSDL[*]Version
now return the compile-time-linked version of the SDL_* library (the same asSDL[_*]_VERSION
&sdl[*]Support
), rather than an approximation of the dynamically-linked version of the SDL_* library. To see the dynamically-linked version, please useSDL_GetVersion
,IMG_Linked_Version
,Mix_Linked_Version
,SDLNet_Linked_Version
orTTF_Linked_Version
for the respective SDL_* libraries instead.- Version identifiers
BindSDL_Image
,BindSDL_Mixer
,BindSDL_Net
andBindSDL_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 theBind
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
andUDPsocket
, instead of sometimes replacing them withvoid*
. - 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 callSDL_Init
and will maketypeof(x)
beint
instead ofint 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 ofbindbc.sdl.bind.*
. This should not affect users who were using the library as-intended, and it is still strongly discouraged for you to directly importsdl.*
instead of importingbindbc.sdl
. - Fixed the signature of
SDL_IntersectFRectAndLine
by changing theint
positions tofloat
s. - Fixed the signature of
SDL_HintCallback
by adding the missingconst(char)*
parameter at the end. SDL_CompilerBarrier
,SDL_MemoryBarrierRelease
andSDL_MemoryBarrierAcquire
are no longer aliases tocore.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
#define
s. 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 ofSDL[*]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_SetRenderDrawColor
→SDL_SetRenderDrawColour
, etc.) - New readme!
[1.2.4] Updated SDL Mixer bindings to support 2.6.0
v1.2.4 Cleanup comments.