12#ifndef SAMPLER_H_6014714286
13#define SAMPLER_H_6014714286
15#include <Carna/Carna.h>
76 const unsigned int id;
81 void bind(
int unit )
const;
Represents an association.
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
static const unsigned int WRAP_MODE_MIRRORED_REPEAT
Represents GL_MIRRORED_REPEAT.
void setWrapModeR(unsigned int wrapMode)
Configures sampling for with .
void setMagFilter(unsigned int magFilter)
Configures sampling for when texel maps onto more than one pixel.
void setWrapModeT(unsigned int wrapMode)
Configures sampling for with .
void bind(int unit) const
Binds the maintained OpenGL sampler objec to texture unit.
static const unsigned int FILTER_LINEAR
Represents GL_LINEAR.
~Sampler()
Deletes the maintained OpenGL sampler object.
void setMinFilter(unsigned int minFilter)
Configures sampling for when texel maps onto less than one pixel.
const unsigned int id
Holds the ID of the maintained OpenGL sampler object.
static const unsigned int WRAP_MODE_REPEAT
Represents GL_REPEAT.
static const unsigned int WRAP_MODE_CLAMP
Represents GL_CLAMP_TO_EDGE.
static const unsigned int FILTER_NEAREST
Represents GL_NEAREST.
Sampler(unsigned int wrapModeS, unsigned int wrapModeT, unsigned int wrapModeR, unsigned int minFilter, unsigned int magFilter)
Creates new OpenGL sampler object.
void setWrapModeS(unsigned int wrapMode)
Configures sampling for with .
#define NON_COPYABLE
Features class it is placed in as non-copyable.