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(const Shader[] shaders...)

CTor Takes multiple Shader instances and links them together

Destructor

~this
~this()

DTor

Postblit

this(this)
@disable this(this)

Postblit is disabled

Copying this object is disabled.

Members

Functions

bind
void bind()

Bind and use the current program

link
bool link(const Shader[] shaders...)

Links multiple Shaders together.

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

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

setParameter
bool setParameter(string name, const Vector2f vec)

Bind a Vector2f to a specific variable name of the Shaders

setParameter
bool setParameter(string name, const Vector3f vec)

Bind a Vector3f to a specific variable name of the Shaders

setParameter
bool setParameter(string name, const Color4b color)

Bind a Color4b to a specific variable name of the Shaders

setParameter
bool setParameter(string name, ref const 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)