Uniform Class Reference
[Basic]

Abstract base class for GLSL uniform variables. More...

#include <Uniform.hpp>

Inheritance diagram for Uniform:
Node Applicable Suppressable UniformFloat UniformInt UniformMatrix UniformSampler UniformVector

List of all members.

Public Member Functions

 Uniform (const Tag &tag)
virtual void associate ()
virtual void apply ()=0
virtual void finalize ()
GLint getLocation () const
string getName () const
ProgramgetProgram () 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
Programprogram
string link
string name
string type

Detailed Description

Abstract base class for GLSL uniform variables.


Constructor & Destructor Documentation

Uniform ( const Tag tag  ) 

Initializes "program", "type", "name", "link", and "suppress" attributes.


Member Function Documentation

void associate (  )  [virtual]

Finds a Program node that is an ancestor of this node.

Exceptions:
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.

Exceptions:
NodeException if location for uniform cannot be found

Reimplemented from Node.

string getTypeNameFor ( GLenum  type  )  [static]
Returns:
Text describing the type of a uniform variable .
map< string, GLenum > getUniformsFor ( Program program  )  [static]
Returns:
Names and types of all the active uniforms in program.
bool isMatrixType ( GLenum  type  )  [static]
Returns:
True if the type is mat2, mat3, or mat3.
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]
Returns:
True if the uniform was suppressed.

Implements Suppressable.


The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:37 2010 for Gander by  doxygen 1.6.3