Window

Encapsulates state-based OpenGL and SDL2 into something much more friendly.

Constructors

this
this()
Undocumented in source.
this
this(string title, int x, int y, int width, int height)

Destructor

~this
~this()
Undocumented in source.

Members

Functions

aspectRatio
float aspectRatio()
framesPerSecond
uint framesPerSecond()
height
int height()
keyboard
Keyboard keyboard()
load
void load()

Override to specify loading behaviour.

processEvent
void processEvent(SDL_Event event)

Override to specify unique actions on SDL events.

quit
void quit()

Halt running.

render
void render()

Override to specify Render behaviour. Called once for each frame per second.

resize
void resize(int width, int height)

Override to specify resizing behaviour.

run
void run(ubyte fps, ubyte ups)
run
void run(ubyte fps)
run
void run()
update
void update()

Override to specify update behaviour. + Called by the Worker-thread to run non-visual updates.

updatesPerSecond
uint updatesPerSecond()
width
int width()

Variables

currentFrame
Frame currentFrame;
Undocumented in source.
onLoad
void delegate() onLoad;
onRender
void delegate() onRender;
onResize
void delegate() onResize;
onUpdate
void delegate() onUpdate;

Meta