|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
gameplay::Pass Class Reference

`#include <Pass.h>`

Inheritance diagram for gameplay::Pass:

List of all members.

## Public Member Functions

const char * | getId () const
Effect * | getEffect () const
void | setVertexAttributeBinding (VertexAttributeBinding *binding)
VertexAttributeBinding * | getVertexAttributeBinding () const
void | bind ()
void | unbind ()

## Detailed Description

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.

## Member Function Documentation

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.

VertexAttributeBinding* gameplay::Pass::getVertexAttributeBinding | ( |  | ) | const

Sets a vertex attribute binding for this pass.

Returns:
  The 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.

Parameters:

  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().

All Classes Functions Variables Typedefs Enumerations Enumerator