Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The TextureSampler class associates a Texture object to an OpenGL texture unit. More...
#include <Shader.hpp>
Public Member Functions | |
TextureSampler () | |
virtual ERenderState | type () const |
virtual void | apply (int index, const Camera *, OpenGLContext *ctx) const |
The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it. | |
void | setTexture (Texture *texture) |
The texture sampler by a texture unit. | |
Texture * | texture () |
The texture sampler by a texture unit. | |
const Texture * | texture () const |
The texture sampler by a texture unit. | |
void | setTexParameter (TexParameter *tex_param) |
The TexParameter used by the sampler used to override the one specified by the bound Texture. | |
TexParameter * | getTexParameter () |
The TexParameter used by the sampler used to override the one specified by the bound Texture. | |
const TexParameter * | getTexParameter () const |
The TexParameter used by the sampler used to override the one specified by the bound Texture. | |
bool | hasTexture () const |
virtual ref< RenderState > | clone () const |
Protected Attributes | |
ref< Texture > | mTexture |
ref< TexParameter > | mTexParameter |
The TextureSampler class associates a Texture object to an OpenGL texture unit.
Definition at line 1747 of file Shader.hpp.
vl::TextureSampler::TextureSampler | ( | ) | [inline] |
Definition at line 1752 of file Shader.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
virtual ERenderState vl::TextureSampler::type | ( | ) | const [inline, virtual] |
Reimplemented from vl::RenderState.
Definition at line 1757 of file Shader.hpp.
References vl::RS_TextureSampler.
void TextureSampler::apply | ( | int | index, |
const Camera * | camera, | ||
OpenGLContext * | ctx | ||
) | const [virtual] |
The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.
Implements vl::RenderState.
Definition at line 1142 of file Shader.cpp.
References vl::TexParameter::apply(), vl::Log::bug(), vl::Texture::dimension(), vl::Texture::getTexParameter(), getTexParameter(), vl::Has_Fixed_Function_Pipeline, hasTexture(), vl::Texture::mTexParameterOverride, vl::Object::objectName(), vl::TexParameter::setDirty(), vl::OpenGLContext::setTexUnitBinding(), vl::TD_TEXTURE_1D_ARRAY, vl::TD_TEXTURE_2D_ARRAY, vl::TD_TEXTURE_2D_MULTISAMPLE, vl::TD_TEXTURE_2D_MULTISAMPLE_ARRAY, vl::TD_TEXTURE_BUFFER, vl::TD_TEXTURE_CUBE_MAP, texture(), vl::OpenGLContext::texUnitBinding(), vl::TPF_LINEAR_MIPMAP_LINEAR, vl::TPF_LINEAR_MIPMAP_NEAREST, vl::TPF_NEAREST_MIPMAP_LINEAR, vl::TPF_NEAREST_MIPMAP_NEAREST, VL_CHECK, VL_CHECK_OGL, VL_MAX_TEXTURE_UNITS, and VL_TRAP.
void vl::TextureSampler::setTexture | ( | Texture * | texture ) | [inline] |
The texture sampler by a texture unit.
Definition at line 1762 of file Shader.hpp.
Referenced by vl::VLXClassWrapper_TextureSampler::importTextureSampler().
Texture* vl::TextureSampler::texture | ( | ) | [inline] |
The texture sampler by a texture unit.
Definition at line 1765 of file Shader.hpp.
Referenced by apply(), vl::VLXClassWrapper_TextureSampler::exportTextureSampler(), and vl::Rendering::fillRenderQueue().
const Texture* vl::TextureSampler::texture | ( | ) | const [inline] |
The texture sampler by a texture unit.
Definition at line 1768 of file Shader.hpp.
void vl::TextureSampler::setTexParameter | ( | TexParameter * | tex_param ) | [inline] |
The TexParameter used by the sampler used to override the one specified by the bound Texture.
Definition at line 1772 of file Shader.hpp.
Referenced by vl::VLXClassWrapper_TextureSampler::importTextureSampler().
TexParameter* vl::TextureSampler::getTexParameter | ( | ) | [inline] |
The TexParameter used by the sampler used to override the one specified by the bound Texture.
Definition at line 1775 of file Shader.hpp.
Referenced by apply(), and vl::VLXClassWrapper_TextureSampler::exportTextureSampler().
const TexParameter* vl::TextureSampler::getTexParameter | ( | ) | const [inline] |
The TexParameter used by the sampler used to override the one specified by the bound Texture.
Definition at line 1778 of file Shader.hpp.
bool TextureSampler::hasTexture | ( | ) | const |
virtual ref<RenderState> vl::TextureSampler::clone | ( | ) | const [inline, virtual] |
Implements vl::RenderState.
Definition at line 1782 of file Shader.hpp.
ref<Texture> vl::TextureSampler::mTexture [protected] |
Definition at line 1790 of file Shader.hpp.
Referenced by hasTexture().
ref<TexParameter> vl::TextureSampler::mTexParameter [protected] |
Definition at line 1791 of file Shader.hpp.