SDL2 Gets Useful Dynamic API Support For Games
Ryan Gordon has added dynamic API support to the SDL2 library that's commonly used by cross-platform games. This dynamic API library should prove to be very useful for games and allows gamers to easily override the SDL library used by a particular game.
What the dynamic API support comes down to is allowing gamers (and other consumers of SDL2) to dynamically override the used SDL library by a piece of software, even if the game/application had statically linked in their copy of SDL.
It's quite common for Linux games to statically link in their own copy of SDL2 and ship their own library. Even games that aren't statically linked usually ship their own bundled SDL library for having one less dependency Linux gamers need to track down and potentially have headaches with in meeting the game's dependencies.
The problem with the games commonly relying upon their own Simple DirectMedia Library is that they can be seldom updated, even when major new SDL releases are out that provide bug-fixes or add new features like different display back-ends, e.g. Wayland support. To fix this problem, Ryan Gordon conceived dynamic API support that allows end-users to override the used SDL2 library even if there's a copy that's statically linked against the software. This will also allow for games and software that's no longer maintained to "magically" receive improvements from SDL2 via overriding the library.
Through the SDL_DYNAMIC_API environment variable, a separate SDL2 library can be specified that is hopefully superior to what's used by the game or other software. This will be very useful in the case of SteamOS and Steam in general with it having its own copy of SDL2 that is updated.
For those interested in more details on the SDL2 Dynamic API support check out Ryan Gordon's Google+ post.
What the dynamic API support comes down to is allowing gamers (and other consumers of SDL2) to dynamically override the used SDL library by a piece of software, even if the game/application had statically linked in their copy of SDL.
It's quite common for Linux games to statically link in their own copy of SDL2 and ship their own library. Even games that aren't statically linked usually ship their own bundled SDL library for having one less dependency Linux gamers need to track down and potentially have headaches with in meeting the game's dependencies.
The problem with the games commonly relying upon their own Simple DirectMedia Library is that they can be seldom updated, even when major new SDL releases are out that provide bug-fixes or add new features like different display back-ends, e.g. Wayland support. To fix this problem, Ryan Gordon conceived dynamic API support that allows end-users to override the used SDL2 library even if there's a copy that's statically linked against the software. This will also allow for games and software that's no longer maintained to "magically" receive improvements from SDL2 via overriding the library.
Through the SDL_DYNAMIC_API environment variable, a separate SDL2 library can be specified that is hopefully superior to what's used by the game or other software. This will be very useful in the case of SteamOS and Steam in general with it having its own copy of SDL2 that is updated.
For those interested in more details on the SDL2 Dynamic API support check out Ryan Gordon's Google+ post.
9 Comments