![]() |
LibCarna Version 3.4.0
|
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom. More...
#include <Sampler.hpp>
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.
Definition at line 47 of file Sampler.hpp.
Represents GL_LINEAR
.
Definition at line 59 of file Sampler.hpp.
Represents GL_NEAREST
.
Definition at line 58 of file Sampler.hpp.
Holds the ID of the maintained OpenGL sampler object.
Definition at line 79 of file Sampler.hpp.
Represents GL_CLAMP_TO_EDGE
.
Definition at line 54 of file Sampler.hpp.
Represents GL_MIRRORED_REPEAT
.
Definition at line 56 of file Sampler.hpp.
Represents GL_REPEAT
.
Definition at line 55 of file Sampler.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen