Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | List of all members
BIAS::SamplerBinding Class Reference

Helper to manage the binding of textures to texture units via uniform names. More...

#include <OpenGLFramework/Utils/SamplerBinding.hh>

Public Member Functions

void Bind ()
 Sets all mapped samplers to appropriate texture units. More...
 
void Cache ()
 Call this to build a cache from the current object states. More...
 
void Clear ()
 
void MapSampler (glfTexture *texture, const std::string &UniformName)
 
 SamplerBinding ()
 
void SetProgram (glfShaderProgram *program)
 

Detailed Description

Helper to manage the binding of textures to texture units via uniform names.

Class does not change the set progra, it only uses it to query the required slot number.

Author
bartczak 08/2009

Definition at line 39 of file SamplerBinding.hh.

Constructor & Destructor Documentation

SamplerBinding::SamplerBinding ( )

Definition at line 7 of file SamplerBinding.cpp.

Member Function Documentation

void SamplerBinding::Bind ( )

Sets all mapped samplers to appropriate texture units.

Definition at line 39 of file SamplerBinding.cpp.

References BIAS::glfShaderProgram::GetProgramId(), and BIAS::glfShaderProgram::GetUniformLocation().

void SamplerBinding::Cache ( )

Call this to build a cache from the current object states.

Attention
The caching is only tracked for the methods known of this class, all things changed directly on the objects will not update the instance.

Definition at line 22 of file SamplerBinding.cpp.

References BIAS::glfShaderProgram::GetProgramId(), and BIAS::glfShaderProgram::GetUniformLocation().

void SamplerBinding::Clear ( )

Definition at line 14 of file SamplerBinding.cpp.

void SamplerBinding::MapSampler ( glfTexture texture,
const std::string &  UniformName 
)

Definition at line 76 of file SamplerBinding.cpp.

void SamplerBinding::SetProgram ( glfShaderProgram program)

Definition at line 69 of file SamplerBinding.cpp.


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