derelict-sdl2 1.1.5

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


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

DerelictSDL2

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

For information on how to build DerelictSDL2 and link it with your programs, please see the post Using Derelict at The One With D.

For information on how to load the SDL 2 libraries via DerelictSDL2, see the page DerelictUtil for Users at the DerelictUtil Wiki. 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.
    ...
}
Authors:
  • Mike Parker
Dependencies:
derelict-util
Versions:
3.1.0-alpha.6 2020-Jul-31
3.1.0-alpha.5 2020-Jul-27
3.1.0-alpha.4 2018-May-18
3.1.0-alpha.3 2017-Dec-10
3.1.0-alpha.2 2017-Sep-30
Show all 99 versions
Download Stats:
  • 2 downloads today

  • 10 downloads this week

  • 28 downloads this month

  • 108895 downloads total

Score:
3.1
Short URL:
derelict-sdl2.dub.pm