d2d.sdl2

LibSDL2

Modules

Color
module d2d.sdl2.Color

Color

EventHandler
module d2d.sdl2.EventHandler

Event Handler

Font
module d2d.sdl2.Font

Font

InputSource
module d2d.sdl2.InputSource

Input Source

Keyboard
module d2d.sdl2.Keyboard

Keyboard

Mouse
module d2d.sdl2.Mouse

Mouse

Polygon
module d2d.sdl2.Polygon

Polygon

Renderer
module d2d.sdl2.Renderer

Renderer

Sound
module d2d.sdl2.Sound

Sound

Surface
module d2d.sdl2.Surface

Surface

Texture
module d2d.sdl2.Texture

Texture

Window
module d2d.sdl2.Window

Window

Members

Functions

ensureSafe
void ensureSafe(int output)

Takes in an integer output from an SDL function and then throws an error if the integer isn't 0 Because SDL doesn't throw errors, but rather returns codes, 0 means a successful finish to a function Any non-zero output from a function means that SDL encountered an error, and this function will throw upon an SDL error

ensureSafe
T ensureSafe(T output)

Takes in an object from an SDL function and then throws an error if the object is null Because SDL doesn't throw errors upon failed object creation, but constructs the object as a null, a non-null object means a successful creation Any null creation means that SDL encountered an error, and this function will throw an SDL error accordingly

handle
SDL_Point* handle(iVector vec)

Gets a 2d vector as an SDL_Point*

handle
SDL_Rect* handle(iRectangle rec)

Gets a 2d axis aligned bounding box as an SDL_Rect*

loadLibImage
void loadLibImage()

Loads SDL_Image libraries Function can be called many times, but load only happens once

loadLibMixer
void loadLibMixer()

Loads SDL_Mixer libraries Function can be called many times, but load only happens once

loadLibSDL
void loadLibSDL(SharedLibVersion ver = SharedLibVersion(2, 0, 2))

Loads base DerelictSDL2 Function can be called many times, but load only happens once

loadLibTTF
void loadLibTTF()

Loads SDL_ttf libraries Function can be called many times, but load only happens once

toPolygon
Polygon!(T, 4) toPolygon(AxisAlignedBoundingBox!(T, 2) rec)

Gets a 2d axis aligned bounding box as a polygon

Meta