A uniform holding a Texture value. More...
#include <Uniform.h>
Public Member Functions | |
virtual | ~UniformSampler () |
Deletes this uniform. | |
virtual UniformType | getType () const |
Returns the type of this uniform. | |
ptr< Sampler > | getSampler () const |
Returns the sampler used to sample the texture bound to this uniform. | |
void | setSampler (const ptr< Sampler > sampler) |
Sets the sampler used to sample the texture bound to this uniform. | |
ptr< Texture > | get () const |
Returns the current value of this uniform. | |
void | set (ptr< Texture > value) |
Sets the value of this uniform. | |
virtual void | setValue (ptr< Value > v) |
Sets the value of this uniform. | |
Protected Member Functions | |
UniformSampler (UniformType type, Program *program, UniformBlock *block, const string &name, GLint location) | |
Creates a new uniform. | |
virtual void | setValue () |
Sets this uniform in its program. |
A uniform holding a Texture value.
In addition to a texture, a UniformSampler can also have a Sampler object to modify the default texture sampling parameters of the bound texture (like the minification of magnification filters).
virtual ork::UniformSampler::~UniformSampler | ( | ) | [virtual] |
Deletes this uniform.
ork::UniformSampler::UniformSampler | ( | UniformType | type, | |
Program * | program, | |||
UniformBlock * | block, | |||
const string & | name, | |||
GLint | location | |||
) | [protected] |
Creates a new uniform.
type | the type of this uniform. | |
program | the Program to which this uniform belongs. | |
block | UniformBlock to which this uniform belongs. Maybe NULL. | |
name | the name of the uniform in the GLSL shader code. | |
location | the location of this uniform. For an uniform inside a block, this location is an offset inside the uniform block buffer. |
Returns the sampler used to sample the texture bound to this uniform.
virtual UniformType ork::UniformSampler::getType | ( | ) | const [virtual] |
Returns the type of this uniform.
Implements ork::Uniform.
Sets the value of this uniform.
value | the new value for this uniform. |
Sets the sampler used to sample the texture bound to this uniform.
sampler | a sampler object. May be NULL. |
virtual void ork::UniformSampler::setValue | ( | ) | [protected, virtual] |
Sets this uniform in its program.
Implements ork::Uniform.
Sets the value of this uniform.
v | the new value for this uniform. Must be of the same type as this Uniform. |
Implements ork::Uniform.