Manages an OpenGL shader program, allowing composition, usage, and uniform variable setting.
void Unload();
Unloads the shader program from GPU memory.
void Compose(std::vector<Shader*> shaders);
Composes the shader program from a list of shaders.
unsigned int GetID();
Returns the ID of the shaderprogram.
inline uint8_t GetType() const;
Returns the type of the shaderprogram.
void Use();
Uses the shaderprogram.
void setFloat(const GLchar* name, GLfloat value);
Sets a float uniform variable in the shader.
void setInteger(const GLchar* name, GLint value);
Sets an integer uniform variable in the shader.
void setVector2f(const GLchar* name, GLfloat x, GLfloat y);
Sets a vec2 uniform variable in the shader (from two floats).
void setVector2f(const GLchar* name, const Vector2D& value);
Sets a vec2 uniform variable in the shader (from a Vector2D).
void setVector3f(const GLchar* name, GLfloat x, GLfloat y, GLfloat z);
Sets a vec3 uniform variable in the shader (from three floats).
void setVector3f(const GLchar* name, const Vector3D& value);
Sets a vec3 uniform variable in the shader (from a Vector3D).
void setVector4f(const GLchar* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
Sets a vec4 uniform variable in the shader (from four floats).
void setVector4f(const GLchar* name, const Vector4D& value);
Sets a vec4 uniform variable in the shader (from a Vector4D).
void setMatrix4(const GLchar* name, const Matrix4D& matrix);
Sets a mat4 uniform variable in the shader.
void setMatrix4Row(const GLchar* name, const Matrix4DRow& matrix);
Sets a mat4 uniform variable in the shader.