#include <Pass.h>
Public Member Functions | |
const char * | getId () const |
Effect * | getEffect () const |
void | setVertexAttributeBinding (VertexAttributeBinding *binding) |
VertexAttributeBinding * | getVertexAttributeBinding () const |
void | bind () |
void | unbind () |
Defines a pass for an object to be rendered.
This class encapsulates the parameters and logic required to apply a shader to an object to be rendered. This includes specifying both a vertex and fragment shader, as well as any uniforms and vertex attributes to be applied to these.
void gameplay::Pass::bind | ( | ) |
Binds the render state for this pass.
This method should be called before executing any drawing code that should use this pass. When drawing code is complete, the unbind() method should be called.
Effect* gameplay::Pass::getEffect | ( | ) | const |
Returns the effect for this Pass.
const char* gameplay::Pass::getId | ( | ) | const |
Returns the Id of this pass.
Sets a vertex attribute binding for this pass.
void gameplay::Pass::setVertexAttributeBinding | ( | VertexAttributeBinding * | binding | ) |
Sets a vertex attribute binding for this pass.
When a mesh binding is set, the VertexAttributeBinding will be automatically bound when the bind() method is called for the pass.
binding | The VertexAttributeBinding to set (or NULL to remove an existing binding). |
void gameplay::Pass::unbind | ( | ) |
Unbinds the render state for this pass.
This method should always be called when rendering for a pass is complete, to restore the render state to the state it was in previous to calling bind().