Description

Dynamic bindings to SDL2, SDL2_image, SDL2_mixer, SDL2_ttf and SDL2_net.

Package Information

Version3.0.0-alpha.6 (2017-May-04)
Homepage https://github.com/DerelictOrg/DerelictSDL2
Repository https://github.com/DerelictOrg/DerelictSDL2
LicenseBoost
AuthorsMike Parker
Registered byMike Parker
Dependencies

derelict-util

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

DerelictSDL2

Dynamic bindings to SDL 2 version 2.0.5, SDL2_image, SDL2_mixer, SDL2_ttf, and SDL2_net for the D Programming Language.

Please see the DerelictSDL2 documentation and the sections on Compiling and Linking and The Derelict Loader, in the Derelict documentation, for information on how to build DerelictSDL2 and load the SDL2 libraries at run time. In the meantime, here's some sample code.

// This example shows how to import all of the DerelictSDL2 bindings. Of course,
// you only need to import the modules that correspond to the libraries you
// actually need to load.
import derelict.sdl2.sdl;
import derelict.sdl2.image;
import derelict.sdl2.mixer;
import derelict.sdl2.ttf;
import derelict.sdl2.net;

void main() {
    // This example shows how to load all of the SDL2 libraries. You only need
    // to call the load methods for those libraries you actually need to load.

    // Load the SDL 2 library.
    DerelictSDL2.load();

    // Load the SDL2_image library.
    DerelictSDL2Image.load();

    // Load the SDL2_mixer library.
    DerelictSDL2Mixer.load();

    // Load the SDL2_ttf library
    DerelictSDL2ttf.load();

    // Load the SDL2_net library.
    DerelictSDL2Net.load();

    // Now SDL 2 functions for all of the SDL2 libraries can be called.
    ...
}

Available versions

3.0.0-alpha.6 3.0.0-alpha.5 3.0.0-alpha.4 3.0.0-alpha.3 3.0.0-alpha.2 3.0.0-alpha.1 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2 1.9.1 1.9.0 1.2.16 1.2.15 1.2.14 1.2.13 1.2.12 1.2.11 1.2.10 1.2.9 1.2.8 1.2.7 1.2.6 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.1.17 1.1.16 1.1.15 1.1.14 1.1.13 1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.19 1.0.18 1.0.17 1.0.16 1.0.15 1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0 ~master ~3.0 ~2.1 ~2.0.4 ~2.0.2 ~2.0.1 ~2.0.0