Cortex  10.0.0-a4
Classes | Public Member Functions | List of all members
IECoreGL::Shader::Setup Class Reference

#include <Shader.h>

+ Inheritance diagram for IECoreGL::Shader::Setup:

Classes

class  ScopedBinding
 

Public Member Functions

 Setup (ConstShaderPtr shader)
 
const Shadershader () const
 
void addUniformParameter (const std::string &name, ConstTexturePtr value)
 
void addUniformParameter (const std::string &name, IECore::ConstDataPtr value)
 
void addVertexAttribute (const std::string &name, IECore::ConstDataPtr value, GLuint divisor=0)
 
bool hasCsValue () const
 Returns true if this setup specifies a value for the standard "Cs" parameter.
 
- Public Member Functions inherited from IECore::RefCounted
 IE_CORE_DECLAREMEMBERPTR (RefCounted)
 
void addRef () const
 Add a reference to the current object.
 
void removeRef () const
 Remove a reference from the current object.
 
RefCount refCount () const
 Returns the current reference count.
 

Additional Inherited Members

- Public Types inherited from IECore::RefCounted
typedef size_t RefCount
 

Detailed Description

Shaders are only useful when associated with a set of values for their uniform parameters and vertex attributes, and to render different objects in different forms different sets of values will be a necessary. The Setup class encapsulates a set of such values and provides a means of cleanly binding and unbinding the Shader using them.

Member Function Documentation

void IECoreGL::Shader::Setup::addVertexAttribute ( const std::string &  name,
IECore::ConstDataPtr  value,
GLuint  divisor = 0 
)

Binds the specified value to the named vertex attribute. The divisor will be passed to glVertexAttribDivisor().


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