GLBackend

Handles opengl contexts and passing data to OpenGL such as shaders and vertices

Constructors

this
this()
Undocumented in source.
this
this(SDL_Window* window, bool vsync)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

add
void add(GLuint texture, Vertex[] newVertices, GLuint[] newIndices)

Add some vertices and indices to the backend

clear
void clear(Color col)

Clear the screen and the vertex and index buffers

flip
void flip()

Flush the buffers and display the new screen

flush
void flush()

Draw the current vertices and indices and clear the buffers

setShader
void setShader(string vertexShader, string fragmentShader, string transformAttributeName, string positionAttributeName, string texPositionAttributeName, string colorAttributeName, string textureAttributeName, string colorOutputName)

Set the current shader and its attributes

setTransform
void setTransform(Transform transform)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

vertices
Array!float vertices;
Undocumented in source.

Meta