OGLplus (0.45.0) a C++ wrapper for OpenGL

Encapsulates sampler-related functions. More...

#include </home/chochlik/devel/oglplus/include/oglplus/sampler.hpp>

Inheritance diagram for oglplus::SamplerOps:

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...
 

Detailed Description

Encapsulates sampler-related functions.

Note
Do not use this class directly, use Sampler instead.
See Also
Sampler

Requires OpenGL 3.3 or the GL_ARB_sampler_objects extension.

Related OpenGL symbols:
glGenSamplers glDeleteSamplers glIsSampler

Member Function Documentation

void oglplus::SamplerOps::Bind ( TextureUnitSelector  unit)

Bind this sampler to the specified texture unit.

Related OpenGL symbols:
glBindSampler
static void oglplus::SamplerOps::Bind ( GLuint  first,
GLsizei  count,
const GLuint *  names 
)
static

Bind the specified samplers to the specified texture units.

Exceptions
ErrorRequires OpenGL 4.4 or the GL_ARB_multi_bind extension.

References OGLPLUS_VERIFY.

Vector<GLfloat, 4> oglplus::SamplerOps::BorderColor ( TypeTag< GLfloat >  ) const

Gets the texture border color.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

void oglplus::SamplerOps::BorderColor ( Vector< GLfloat, 4 >  color)

Sets the texture border color.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

Vector<GLint, 4> oglplus::SamplerOps::BorderColor ( TypeTag< GLint >  ) const

Gets the texture border color.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

void oglplus::SamplerOps::BorderColor ( Vector< GLint, 4 >  color)

Sets the texture border color.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

Vector<GLuint, 4> oglplus::SamplerOps::BorderColor ( TypeTag< GLuint >  ) const

Gets the texture border color.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

void oglplus::SamplerOps::BorderColor ( Vector< GLuint, 4 >  color)

Sets the texture border color.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_BORDER_COLOR

References OGLPLUS_CHECK.

CompareFunction oglplus::SamplerOps::CompareFunc ( void  ) const

Gets the compare function.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_COMPARE_FUNC
void oglplus::SamplerOps::CompareFunc ( CompareFunction  func)

Sets the compare function.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_COMPARE_FUNC

References OGLPLUS_CHECK.

TextureCompareMode oglplus::SamplerOps::CompareMode ( void  ) const

Gets the compare mode.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_COMPARE_MODE
void oglplus::SamplerOps::CompareMode ( TextureCompareMode  mode)

Sets the compare mode.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_COMPARE_MODE

References OGLPLUS_CHECK.

GLfloat oglplus::SamplerOps::LODBias ( void  ) const

Gets the LOD bias value.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_LOD_BIAS
void oglplus::SamplerOps::LODBias ( GLfloat  value)

Sets the LOD bias value.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_LOD_BIAS

References OGLPLUS_CHECK.

TextureMagFilter oglplus::SamplerOps::MagFilter ( void  ) const

Gets the magnification filter.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_MAG_FILTER
void oglplus::SamplerOps::MagFilter ( TextureMagFilter  filter)

Sets the magnification filter.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_MAG_FILTER

References OGLPLUS_CHECK.

GLfloat oglplus::SamplerOps::MaxLOD ( void  ) const

Gets maximal LOD value.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_MAX_LOD
void oglplus::SamplerOps::MaxLOD ( GLfloat  value)

Sets maximal LOD value.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_MAX_LOD

References OGLPLUS_CHECK.

TextureMinFilter oglplus::SamplerOps::MinFilter ( void  ) const

Gets the minification filter.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_MIN_FILTER
void oglplus::SamplerOps::MinFilter ( TextureMinFilter  filter)

Sets the minification filter.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_MIN_FILTER

References OGLPLUS_CHECK.

GLfloat oglplus::SamplerOps::MinLOD ( void  ) const

Gets minimal LOD value.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_MIN_LOD
void oglplus::SamplerOps::MinLOD ( GLfloat  value)

Sets minimal LOD value.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_MIN_LOD

References OGLPLUS_CHECK.

bool oglplus::SamplerOps::Seamless ( void  ) const

Gets the seamless cubemap setting.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_CUBE_MAP_SEAMLESS
void oglplus::SamplerOps::Seamless ( bool  enable)

Sets the seamless cubemap setting.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_CUBE_MAP_SEAMLESS

References OGLPLUS_CHECK.

static void oglplus::SamplerOps::Unbind ( TextureUnitSelector  unit)
static

Unbind the current sampler from the specified texture unit.

Related OpenGL symbols:
glBindSampler

References OGLPLUS_VERIFY.

TextureWrap oglplus::SamplerOps::Wrap ( TextureWrapCoord  coord) const

Gets the wrap parameter (TEXTURE_WRAP_*)

Related OpenGL symbols:
glGetSamplerParameter

Referenced by WrapR(), WrapS(), and WrapT().

void oglplus::SamplerOps::Wrap ( TextureWrapCoord  coord,
TextureWrap  mode 
)

Sets the wrap parameter (TEXTURE_WRAP_*)

Related OpenGL symbols:
glSamplerParameter

References OGLPLUS_CHECK.

TextureWrap oglplus::SamplerOps::WrapR ( void  ) const

Gets the wrap parameter for the R coordinate.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_WRAP_R

References oglplus::R, and Wrap().

void oglplus::SamplerOps::WrapR ( TextureWrap  mode)

Sets the wrap parameter for the R coordinate.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_WRAP_R

References oglplus::R, and Wrap().

TextureWrap oglplus::SamplerOps::WrapS ( void  ) const

Gets the wrap parameter for the S coordinate.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_WRAP_S

References oglplus::S, and Wrap().

void oglplus::SamplerOps::WrapS ( TextureWrap  mode)

Sets the wrap parameter for the S coordinate.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_WRAP_S

References oglplus::S, and Wrap().

TextureWrap oglplus::SamplerOps::WrapT ( void  ) const

Gets the wrap parameter for the T coordinate.

Related OpenGL symbols:
glGetSamplerParameter GL_TEXTURE_WRAP_T

References oglplus::T, and Wrap().

void oglplus::SamplerOps::WrapT ( TextureWrap  mode)

Sets the wrap parameter for the T coordinate.

Related OpenGL symbols:
glSamplerParameter GL_TEXTURE_WRAP_T

References oglplus::T, and Wrap().


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/sampler.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).