Carna
Version 3.3.2
|
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom. More...
#include <Sampler.h>
Public Member Functions | |
Sampler (unsigned int wrapModeS, unsigned int wrapModeT, unsigned int wrapModeR, unsigned int minFilter, unsigned int magFilter) | |
Creates new OpenGL sampler object. | |
~Sampler () | |
Deletes the maintained OpenGL sampler object. | |
void | bind (int unit) const |
Binds the maintained OpenGL sampler objec to texture unit. | |
void | setWrapModeS (unsigned int wrapMode) |
Configures sampling for \(\left(s,t,r\right)^\mathrm T\) with \(s\not\in\left[0,1\right]\). | |
void | setWrapModeT (unsigned int wrapMode) |
Configures sampling for \(\left(s,t,r\right)^\mathrm T\) with \(t\not\in\left[0,1\right]\). | |
void | setWrapModeR (unsigned int wrapMode) |
Configures sampling for \(\left(s,t,r\right)^\mathrm T\) with \(r\not\in\left[0,1\right]\). | |
void | setMinFilter (unsigned int minFilter) |
Configures sampling for when texel maps onto less than one pixel. | |
void | setMagFilter (unsigned int magFilter) |
Configures sampling for when texel maps onto more than one pixel. | |
Public Attributes | |
const unsigned int | id |
Holds the ID of the maintained OpenGL sampler object. | |
Static Public Attributes | |
static const unsigned int | WRAP_MODE_CLAMP |
Represents GL_CLAMP_TO_EDGE . | |
static const unsigned int | WRAP_MODE_REPEAT |
Represents GL_REPEAT . | |
static const unsigned int | WRAP_MODE_MIRRORED_REPEAT |
Represents GL_MIRRORED_REPEAT . | |
static const unsigned int | FILTER_NEAREST |
Represents GL_NEAREST . | |
static const unsigned int | FILTER_LINEAR |
Represents GL_LINEAR . | |
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Sampling values from textures requires a sampler object to be bound to the same texture unit as the texture is bound to. The sampler object controls how values are sampled from the texture.
Documentation generated by Doxygen