#include <Texture.h>
Public Member Functions | |
virtual | ~Sampler () |
void | setWrapMode (Wrap wrapS, Wrap wrapT, Wrap wrapR=REPEAT) |
void | setFilterMode (Filter minificationFilter, Filter magnificationFilter) |
Texture * | getTexture () const |
void | bind () |
Static Public Member Functions | |
static Sampler * | create (Texture *texture) |
static Sampler * | create (const char *path, bool generateMipmaps=false) |
Defines a texture sampler.
A texture sampler is basically an instance of a texture that can be used to sample a texture from a material. In addition to the texture itself, a sampler stores per-instance texture state information, such as wrap and filter modes.
virtual gameplay::Texture::Sampler::~Sampler | ( | ) | [virtual] |
Destructor.
void gameplay::Texture::Sampler::bind | ( | ) |
Binds the texture of this sampler to the renderer and applies the sampler state.
static Sampler* gameplay::Texture::Sampler::create | ( | Texture * | texture | ) | [static] |
Creates a sampler for the specified texture.
texture | The texture. |
static Sampler* gameplay::Texture::Sampler::create | ( | const char * | path, |
bool | generateMipmaps = false |
||
) | [static] |
Creates a sampler for the specified texture.
path | Path to the texture to create a sampler for. |
generateMipmaps | True to force a full mipmap chain to be generated for the texture, false otherwise. |
Texture* gameplay::Texture::Sampler::getTexture | ( | ) | const |
Gets the texture for this sampler.
void gameplay::Texture::Sampler::setFilterMode | ( | Filter | minificationFilter, |
Filter | magnificationFilter | ||
) |
Sets the texture filter modes for this sampler.
minificationFilter | The texture minification filter. |
magnificationFilter | The texture magnification filter. |
void gameplay::Texture::Sampler::setWrapMode | ( | Wrap | wrapS, |
Wrap | wrapT, | ||
Wrap | wrapR = REPEAT |
||
) |
Sets the wrap mode for this sampler.
wrapS | The horizontal wrap mode. |
wrapT | The vertical wrap mode. |
wrapR | The depth wrap mode. |