ShaderProgram

The Program struct manages a OpenGL-Shader-Program. Multiple Shaders can be attached to it. The Program links the attached Shaders and then they can be used.

Constructors

this
this(Shader[] shaders)

CTor Takes multiple Shader instances and links them together

Destructor

~this
~this()

DTor

Postblit

this(this)
this(this)

Postblit is disabled

Members

Functions

bind
void bind()

Bind and use the current program

link
bool link(Shader[] shaders)

Links multiple Shaders together.

setParameter
bool setParameter(string name, float[] values)

Set between 1 and 4 parameter and binds them to variables of the Shaders

setParameter
bool setParameter(string name, Vector2f vec)

Bind a Vector2f to a specific variable name of the Shaders

setParameter
bool setParameter(string name, Vector3f vec)

Bind a Vector3f to a specific variable name of the Shaders

setParameter
bool setParameter(string name, Color4b color)

Bind a Color4b to a specific variable name of the Shaders

setParameter
bool setParameter(string name, Matrix4x4 mat)

Bind a Matrix4x4 to a specific variable name of the Shaders

unbind
void unbind()

Unbind the current program. It is no longer used.

Properties

ID
uint ID [@property getter]

Returns the internal Program ID

Meta

Authors

Randy Schuett (rswhite4@googlemail.com)