Giter Club home page Giter Club logo

derelictsdl2's Introduction

DerelictSDL2

NOTE: DerelictSDL2 is in bugfix-only mode. It has been superseded by the bindbc-sdl package. DerelictSDL2 will be available through the dub repository for as long as old projects depend upon it, but new projects should use bindbc-sdl.

Dynamic bindings to SDL 2 versions 2.0.0 - 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.
    ...
}

derelictsdl2's People

Contributors

mdparker avatar mathstuf avatar p0nce avatar pineapplemachine avatar puffi avatar hackerpilot avatar srmordred avatar commonquail avatar buggins avatar rosequix avatar notspooky avatar mleise avatar marfisc avatar johanengelen avatar darkragnara avatar smandy avatar zaafonin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.