D2D

Module for including all D2DGame components.

Public Imports

derelict.sdl2.sdl
public import derelict.sdl2.sdl;
derelict.sdl2.image
public import derelict.sdl2.image;
derelict.sdl2.ttf
public import derelict.sdl2.ttf;
derelict.opengl3.gl3
public import derelict.opengl3.gl3;
gl3n.aabb
public import gl3n.aabb;
gl3n.frustum
public import gl3n.frustum;
gl3n.interpolate
public import gl3n.interpolate;
gl3n.linalg
public import gl3n.linalg;
gl3n.plane
public import gl3n.plane;
gl3n.util
public import gl3n.util;
gl3n.ext.matrixstack
public import gl3n.ext.matrixstack;
std.math
public import std.math;
D2DGame.Core.IVerifiable
public import D2DGame.Core.IVerifiable;
D2DGame.Core.IDisposable
public import D2DGame.Core.IDisposable;
D2DGame.Core.Transformable
public import D2DGame.Core.Transformable;
D2DGame.Core.Color3
public import D2DGame.Core.Color3;
D2DGame.Core.FPSLimiter
public import D2DGame.Core.FPSLimiter;
D2DGame.Window.Window
public import D2DGame.Window.Window;
D2DGame.Window.WindowEvent
public import D2DGame.Window.WindowEvent;
D2DGame.Window.WindowFlags
public import D2DGame.Window.WindowFlags;
D2DGame.Rendering.IRenderTarget
public import D2DGame.Rendering.IRenderTarget;
D2DGame.Rendering.Mesh
public import D2DGame.Rendering.Mesh;
D2DGame.Rendering.IDrawable
public import D2DGame.Rendering.IDrawable;
D2DGame.Rendering.Texture
public import D2DGame.Rendering.Texture;
D2DGame.Rendering.Bitmap
public import D2DGame.Rendering.Bitmap;
D2DGame.Rendering.Color
public import D2DGame.Rendering.Color;
D2DGame.Rendering.Shader
public import D2DGame.Rendering.Shader;
D2DGame.Rendering.ShaderProgram
public import D2DGame.Rendering.ShaderProgram;
D2DGame.Rendering.Shape
public import D2DGame.Rendering.Shape;
D2DGame.Rendering.RectangleShape
public import D2DGame.Rendering.RectangleShape;
D2DGame.Toolkit.Game
public import D2DGame.Toolkit.Game;
std.string
public import std.string;
std.typecons
public import std.typecons;

Members

Functions

rotate2d
mat4 rotate2d(mat4 mat, float alpha)

2D rotation on a mat4.

scale2d
mat4 scale2d(mat4 mat, float x, float y)

2D scale on a mat4.

translate2d
mat4 translate2d(mat4 mat, float x, float y)

2D translation on a mat4.

Variables

matrixStack
MatrixStack!mat4 matrixStack;

Matrix stack for modelview (like glPopMatrix, glPushMatrix).

projectionStack
MatrixStack!mat4 projectionStack;

Matrix stack for projection.

Examples

import D2D;

void main()
{
    Window window = new Window();

    Event event; // Or WindowEvent
    while(window.open)
    {
        while (window.pollEvent(event))
        {
            if(event.type = Event.Type.Quit)
                window.close();
        }
        window.clear();

        window.display();
    }
}

Meta