Shader

Class containing a single shader for combining in a ShaderProgram.

Members

Functions

compile
bool compile()

Compiles the shader and throws an Exception if an error occured. Will automatically be called when attaching the shader to a ShaderProgram instance.

load
bool load(ShaderType type, string content)

Loads the shader content into memory.

Properties

id
uint id [@property getter]

The OpenGL id of this shader.

valid
bool valid [@property getter]

Checks if this shader is valid.

Static functions

create
Shader create(ShaderType type, string content)

Creates a shader, loads the content and compiles it in one function.

Meta