Abstract base class for GLSL uniform variables. More...
#include <Uniform.hpp>
Public Member Functions | |
| Uniform (const Tag &tag) | |
| virtual void | associate () |
| virtual void | apply ()=0 |
| virtual void | finalize () |
| GLint | getLocation () const |
| string | getName () const |
| Program * | getProgram () const |
| virtual void | remove () |
| void | setLocation (GLint location) |
| void | setName (const string &name) |
| void | setProgram (Program *program) |
| virtual string | toString () const |
| virtual bool | wasSuppressed () const |
Static Public Member Functions | |
| static map< string, GLenum > | getUniformsFor (Program *program) |
| static string | getTypeNameFor (GLenum type) |
| static bool | isMatrixType (GLenum type) |
Protected Attributes | |
| GLint | location |
| Program * | program |
| string | link |
| string | name |
| string | type |
Abstract base class for GLSL uniform variables.
Initializes "program", "type", "name", "link", and "suppress" attributes.
| void associate | ( | ) | [virtual] |
Finds a Program node that is an ancestor of this node.
| NodeException | if program cannot be found. |
Reimplemented from Node.
Reimplemented in UniformFloat, UniformSampler, and UniformVector.
| void finalize | ( | ) | [virtual] |
Finds the variable's location in the program.
| NodeException | if location for uniform cannot be found |
Reimplemented from Node.
| string getTypeNameFor | ( | GLenum | type | ) | [static] |
| map< string, GLenum > getUniformsFor | ( | Program * | program | ) | [static] |
| bool isMatrixType | ( | GLenum | type | ) | [static] |
| string toString | ( | ) | const [virtual] |
Forms a string from the object's attributes.
Reimplemented from Node.
Reimplemented in UniformFloat, UniformInt, UniformMatrix, UniformSampler, and UniformVector.
| bool wasSuppressed | ( | ) | const [virtual] |
Implements Suppressable.
1.6.3