Describes a Sampler object.
More...
#include <Sampler.hpp>
|
enum | Parameter : GLenum {
Parameter::MinFilter = GL_TEXTURE_MIN_FILTER,
Parameter::MagFilter = GL_TEXTURE_MAG_FILTER,
Parameter::MinLoD = GL_TEXTURE_MIN_LOD,
Parameter::MaxLoD = GL_TEXTURE_MAX_LOD,
Parameter::LoDBias = GL_TEXTURE_LOD_BIAS,
Parameter::WrapS = GL_TEXTURE_WRAP_S,
Parameter::WrapT = GL_TEXTURE_WRAP_T,
Parameter::WrapR = GL_TEXTURE_WRAP_R,
Parameter::BorderColor = GL_TEXTURE_BORDER_COLOR,
Parameter::CompareMode = GL_TEXTURE_COMPARE_MODE,
Parameter::CompareFunc = GL_TEXTURE_COMPARE_FUNC
} |
| Sampler parameters. More...
|
|
Describes a Sampler object.
- Todo:
- Parameter value enums.
Sampler parameters.
Enumerator |
---|
MinFilter |
|
MagFilter |
|
MinLoD |
|
MaxLoD |
|
LoDBias |
|
WrapS |
|
WrapT |
|
WrapR |
|
BorderColor |
|
CompareMode |
|
CompareFunc |
|
Sampler::Sampler |
( |
GLuint |
handle | ) |
|
Constructor from an existing sampler name.
- Parameters
-
handle | OpenGL name for an existing sampler. |
Sampler::Sampler |
( |
const Sampler & |
| ) |
|
|
default |
void Sampler::bind |
( |
unsigned int |
unit = 0 | ) |
const |
Binds the sampler to the unit texture 'unit'.
- Parameters
-
void Sampler::cleanup |
( |
| ) |
|
|
protectedvirtual |
static bool Sampler::isSampler |
( |
GLuint |
name | ) |
|
|
inlinestaticprotected |
virtual bool Sampler::isValid |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns true if the object seems valid.
Can be overloaded for concrete types if there is other attributes to test.
Reimplemented from OpenGLObject.
template<typename T >
void Sampler::set |
( |
Parameter |
opt, |
|
|
T |
value |
|
) |
| const |
|
inline |
Set the parameter opt for value for this sampler.
- Parameters
-
opt | Sampler parameter. |
value | New value for opt. |
template<typename T >
void Sampler::setI |
( |
Parameter |
opt, |
|
|
T |
value |
|
) |
| const |
|
inline |
Set the parameter opt for value for this sampler.
- Parameters
-
opt | Sampler parameter. |
value | New value for opt. |
void Sampler::unbind |
( |
unsigned int |
unit = 0 | ) |
const |
Unbinds any currently bound sampler to the unit texture 'unit'.
- Parameters
-
The documentation for this class was generated from the following files: