Basic Image AlgorithmS Library
2.8.0
|
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) |
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.
Definition at line 39 of file SamplerBinding.hh.
SamplerBinding::SamplerBinding | ( | ) |
Definition at line 7 of file SamplerBinding.cpp.
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.
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.