Encapsulates sampler-related functions. More...
#include </home/chochlik/devel/oglplus/include/oglplus/sampler.hpp>
Public Types | |
typedef TextureUnitSelector | Target |
The target for sampler binding. | |
Public Member Functions | |
void | Bind (TextureUnitSelector unit) |
Bind this sampler to the specified texture unit. More... | |
Vector< GLfloat, 4 > | BorderColor (TypeTag< GLfloat >) const |
Gets the texture border color. More... | |
void | BorderColor (Vector< GLfloat, 4 > color) |
Sets the texture border color. More... | |
Vector< GLint, 4 > | BorderColor (TypeTag< GLint >) const |
Gets the texture border color. More... | |
void | BorderColor (Vector< GLint, 4 > color) |
Sets the texture border color. More... | |
Vector< GLuint, 4 > | BorderColor (TypeTag< GLuint >) const |
Gets the texture border color. More... | |
void | BorderColor (Vector< GLuint, 4 > color) |
Sets the texture border color. More... | |
TextureCompareMode | CompareMode (void) const |
Gets the compare mode. More... | |
void | CompareMode (TextureCompareMode mode) |
Sets the compare mode. More... | |
CompareFunction | CompareFunc (void) const |
Gets the compare function. More... | |
void | CompareFunc (CompareFunction func) |
Sets the compare function. More... | |
GLfloat | LODBias (void) const |
Gets the LOD bias value. More... | |
void | LODBias (GLfloat value) |
Sets the LOD bias value. More... | |
TextureMagFilter | MagFilter (void) const |
Gets the magnification filter. More... | |
void | MagFilter (TextureMagFilter filter) |
Sets the magnification filter. More... | |
TextureMinFilter | MinFilter (void) const |
Gets the minification filter. More... | |
void | MinFilter (TextureMinFilter filter) |
Sets the minification filter. More... | |
GLfloat | MinLOD (void) const |
Gets minimal LOD value. More... | |
void | MinLOD (GLfloat value) |
Sets minimal LOD value. More... | |
GLfloat | MaxLOD (void) const |
Gets maximal LOD value. More... | |
void | MaxLOD (GLfloat value) |
Sets maximal LOD value. More... | |
TextureWrap | Wrap (TextureWrapCoord coord) const |
Gets the wrap parameter (TEXTURE_WRAP_*) More... | |
void | Wrap (TextureWrapCoord coord, TextureWrap mode) |
Sets the wrap parameter (TEXTURE_WRAP_*) More... | |
TextureWrap | WrapS (void) const |
Gets the wrap parameter for the S coordinate. More... | |
void | WrapS (TextureWrap mode) |
Sets the wrap parameter for the S coordinate. More... | |
TextureWrap | WrapT (void) const |
Gets the wrap parameter for the T coordinate. More... | |
void | WrapT (TextureWrap mode) |
Sets the wrap parameter for the T coordinate. More... | |
TextureWrap | WrapR (void) const |
Gets the wrap parameter for the R coordinate. More... | |
void | WrapR (TextureWrap mode) |
Sets the wrap parameter for the R coordinate. More... | |
bool | Seamless (void) const |
Gets the seamless cubemap setting. More... | |
void | Seamless (bool enable) |
Sets the seamless cubemap setting. More... | |
Static Public Member Functions | |
static void | Unbind (TextureUnitSelector unit) |
Unbind the current sampler from the specified texture unit. More... | |
static void | Bind (GLuint first, GLsizei count, const GLuint *names) |
Bind the specified samplers to the specified texture units. More... | |
Encapsulates sampler-related functions.
Requires OpenGL 3.3 or the GL_ARB_sampler_objects extension.
void oglplus::SamplerOps::Bind | ( | TextureUnitSelector | unit) |
Bind this sampler to the specified texture unit.
|
static |
Bind the specified samplers to the specified texture units.
Error | Requires OpenGL 4.4 or the GL_ARB_multi_bind extension. |
References OGLPLUS_VERIFY.
Gets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
void oglplus::SamplerOps::BorderColor | ( | Vector< GLfloat, 4 > | color) |
Sets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
Gets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
void oglplus::SamplerOps::BorderColor | ( | Vector< GLint, 4 > | color) |
Sets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
Gets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
void oglplus::SamplerOps::BorderColor | ( | Vector< GLuint, 4 > | color) |
Sets the texture border color.
GL_TEXTURE_BORDER_COLOR
References OGLPLUS_CHECK.
CompareFunction oglplus::SamplerOps::CompareFunc | ( | void | ) | const |
Gets the compare function.
GL_TEXTURE_COMPARE_FUNC
void oglplus::SamplerOps::CompareFunc | ( | CompareFunction | func) |
Sets the compare function.
GL_TEXTURE_COMPARE_FUNC
References OGLPLUS_CHECK.
TextureCompareMode oglplus::SamplerOps::CompareMode | ( | void | ) | const |
Gets the compare mode.
GL_TEXTURE_COMPARE_MODE
void oglplus::SamplerOps::CompareMode | ( | TextureCompareMode | mode) |
Sets the compare mode.
GL_TEXTURE_COMPARE_MODE
References OGLPLUS_CHECK.
GLfloat oglplus::SamplerOps::LODBias | ( | void | ) | const |
Gets the LOD bias value.
GL_TEXTURE_LOD_BIAS
void oglplus::SamplerOps::LODBias | ( | GLfloat | value) |
Sets the LOD bias value.
GL_TEXTURE_LOD_BIAS
References OGLPLUS_CHECK.
TextureMagFilter oglplus::SamplerOps::MagFilter | ( | void | ) | const |
Gets the magnification filter.
GL_TEXTURE_MAG_FILTER
void oglplus::SamplerOps::MagFilter | ( | TextureMagFilter | filter) |
Sets the magnification filter.
GL_TEXTURE_MAG_FILTER
References OGLPLUS_CHECK.
GLfloat oglplus::SamplerOps::MaxLOD | ( | void | ) | const |
Gets maximal LOD value.
GL_TEXTURE_MAX_LOD
void oglplus::SamplerOps::MaxLOD | ( | GLfloat | value) |
Sets maximal LOD value.
GL_TEXTURE_MAX_LOD
References OGLPLUS_CHECK.
TextureMinFilter oglplus::SamplerOps::MinFilter | ( | void | ) | const |
Gets the minification filter.
GL_TEXTURE_MIN_FILTER
void oglplus::SamplerOps::MinFilter | ( | TextureMinFilter | filter) |
Sets the minification filter.
GL_TEXTURE_MIN_FILTER
References OGLPLUS_CHECK.
GLfloat oglplus::SamplerOps::MinLOD | ( | void | ) | const |
Gets minimal LOD value.
GL_TEXTURE_MIN_LOD
void oglplus::SamplerOps::MinLOD | ( | GLfloat | value) |
Sets minimal LOD value.
GL_TEXTURE_MIN_LOD
References OGLPLUS_CHECK.
bool oglplus::SamplerOps::Seamless | ( | void | ) | const |
Gets the seamless cubemap setting.
GL_TEXTURE_CUBE_MAP_SEAMLESS
void oglplus::SamplerOps::Seamless | ( | bool | enable) |
Sets the seamless cubemap setting.
GL_TEXTURE_CUBE_MAP_SEAMLESS
References OGLPLUS_CHECK.
|
static |
Unbind the current sampler from the specified texture unit.
References OGLPLUS_VERIFY.
TextureWrap oglplus::SamplerOps::Wrap | ( | TextureWrapCoord | coord) | const |
Gets the wrap parameter (TEXTURE_WRAP_*)
void oglplus::SamplerOps::Wrap | ( | TextureWrapCoord | coord, |
TextureWrap | mode | ||
) |
Sets the wrap parameter (TEXTURE_WRAP_*)
References OGLPLUS_CHECK.
TextureWrap oglplus::SamplerOps::WrapR | ( | void | ) | const |
Gets the wrap parameter for the R coordinate.
GL_TEXTURE_WRAP_R
References oglplus::R, and Wrap().
void oglplus::SamplerOps::WrapR | ( | TextureWrap | mode) |
Sets the wrap parameter for the R coordinate.
GL_TEXTURE_WRAP_R
References oglplus::R, and Wrap().
TextureWrap oglplus::SamplerOps::WrapS | ( | void | ) | const |
Gets the wrap parameter for the S coordinate.
GL_TEXTURE_WRAP_S
References oglplus::S, and Wrap().
void oglplus::SamplerOps::WrapS | ( | TextureWrap | mode) |
Sets the wrap parameter for the S coordinate.
GL_TEXTURE_WRAP_S
References oglplus::S, and Wrap().
TextureWrap oglplus::SamplerOps::WrapT | ( | void | ) | const |
Gets the wrap parameter for the T coordinate.
GL_TEXTURE_WRAP_T
References oglplus::T, and Wrap().
void oglplus::SamplerOps::WrapT | ( | TextureWrap | mode) |
Sets the wrap parameter for the T coordinate.
GL_TEXTURE_WRAP_T
References oglplus::T, and Wrap().