#include <TextureSampler.hpp>
Definition at line 36 of file TextureSampler.hpp.
The filtering mode
Enumerator |
---|
None |
No filtering.
|
Bilinear |
Bilinear (linear) filtering.
|
Trilinear |
Trilinear filtering, requires mipmaps.
|
Anisotropic |
Anisotropic filtering, requires mipmaps \warning Only supported with the extension EXT_texture_filter_anisotropic |
Definition at line 46 of file TextureSampler.hpp.
The repeat mode
- Warning
- Repeat modes (Basic, Mirrored) on GLES 2.0 are only supported with the extension OES_texture_npot, when using non-power-of-two textures
Enumerator |
---|
Basic |
Repeat.
|
Mirrored |
Mirrored repeat.
|
ClampEdge |
Clamp to edge.
|
ClampBorder |
Clamp to border \warning On GLES 3.1 and lesser, only supported with one of these extensions:
NV_texture_border_clamp, EXT_texture_border_clamp, OES_texture_border_clamp |
Definition at line 64 of file TextureSampler.hpp.
jop::TextureSampler::TextureSampler |
( |
const std::string & |
name | ) |
|
Constructor.
This will create a sampler object with default settings.
- Parameters
-
jop::TextureSampler::TextureSampler |
( |
const std::string & |
name, |
|
|
const Filter |
filter, |
|
|
const Repeat |
repeat, |
|
|
const float |
param = 1.f |
|
) |
| |
Constructor.
- Parameters
-
name | Name of the resource |
filter | Initial filtering mode |
repeat | Initial repeating mode |
param | Anisotropic filtering level |
jop::TextureSampler::~TextureSampler |
( |
| ) |
|
void jop::TextureSampler::bind |
( |
const unsigned int |
textureUnit | ) |
const |
Bind this sampler.
- Parameters
-
textureUnit | The texture unit to bind this sample into |
float jop::TextureSampler::getAnisotropyLevel |
( |
| ) |
const |
Get the anisotropy level.
- Returns
- The anisotropy level
const Color& jop::TextureSampler::getBorderColor |
( |
| ) |
const |
Get the border color.
- Returns
- The border color
Filter jop::TextureSampler::getFilterMode |
( |
| ) |
const |
Get the filtering mode.
- Returns
- The filtering mode
unsigned int jop::TextureSampler::getHandle |
( |
| ) |
const |
Get the OpenGL handle.
- Returns
- The OpenGL handle
static float jop::TextureSampler::getMaxAnisotropy |
( |
| ) |
|
|
static |
Get the maximum anisotropy level supported by the system.
- Returns
- The maximum anisotropy level. Zero if not supported
Repeat jop::TextureSampler::getRepeatMode |
( |
| ) |
const |
Get the repeating mode.
- Returns
- The repeating mode
Delete and recreate this sampler, clearing all the settings.
- Returns
- Reference to self
Set the border color.
- Warning
- On GLES 3.1 and lesser, only supported with one of these extensions: EXT_texture_border_clamp, OES_texture_border_clamp
- Parameters
-
- Returns
- Reference to self
Set the filtering mode.
- Parameters
-
mode | The filtering mode |
param | Possible anisotropic filtering level |
- Returns
- Reference to self
Set the repeating mode.
- Parameters
-
- Returns
- Reference to self
static void jop::TextureSampler::unbind |
( |
const unsigned int |
textureUnit | ) |
|
|
static |
Unbind a sampler.
- Parameters
-
textureUnit | The texture unit to unbind a sampler from |
The documentation for this class was generated from the following file: