version 3.3

VRS::GL2::VariablesMapping Class Reference

#include <vrs/opengl/gl2/variablesmapping.h>

Inheritance diagram for VRS::GL2::VariablesMapping:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 VariablesMapping ()
int location (const std::string &variableName) const
GLenum type (const std::string &variableName) const
std::string variable (int variableLocation) const
int count (const std::string &variableName) const
 < The name of the variable associated to a location resp. handle
int count (int variableLocation) const
SO< Iterator< std::string > > samplers () const
 < The number of parameter of a variable.
void add (int location, const std::string &name, int count, GLenum type)
 < Assembly of variable data
bool remove (const std::string &name)
bool clear ()
 Add, remove mappings and clear all existing mappings.
 VRS_TYPEINFO (VariablesMapping, SharedObj)

Classes

struct  Mapping


Detailed Description

Shader object related variable mappings used to direct parameter to a shader object during execution. Note that variables mapping are generated automtically when evaluating a shader program. The mappings can later be used to acquired locations of, for instance, uniform variables to parameterize shader programs.

Constructor & Destructor Documentation

VRS::GL2::VariablesMapping::VariablesMapping (  ) 

A variable mapping associates the location of the variable in a shader object, its name to be referenced in the shader program, and its number of parameter.


Member Function Documentation

int VRS::GL2::VariablesMapping::location ( const std::string &  variableName  )  const

Location represents the handle for the variable. The location of a uniform variable can only be acquired when the shader object has been compiled successfully. -1 means the variableName is invalid.

GLenum VRS::GL2::VariablesMapping::type ( const std::string &  variableName  )  const

OpenGL type. GL_INVALID_ENUM means the variableName is invalid.

std::string VRS::GL2::VariablesMapping::variable ( int  variableLocation  )  const

int VRS::GL2::VariablesMapping::count ( const std::string &  variableName  )  const

< The name of the variable associated to a location resp. handle

int VRS::GL2::VariablesMapping::count ( int  variableLocation  )  const

SO<Iterator<std::string> > VRS::GL2::VariablesMapping::samplers (  )  const

< The number of parameter of a variable.

Sampler variables

void VRS::GL2::VariablesMapping::add ( int  location,
const std::string &  name,
int  count,
GLenum  type 
)

< Assembly of variable data

bool VRS::GL2::VariablesMapping::remove ( const std::string &  name  ) 

bool VRS::GL2::VariablesMapping::clear (  ) 

Add, remove mappings and clear all existing mappings.

VRS::GL2::VariablesMapping::VRS_TYPEINFO ( VariablesMapping  ,
SharedObj   
)


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:32 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact