Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
The TextureUnit class associates a Texture object to an OpenGL texture unit. More...
#include <Shader.hpp>
Public Member Functions | |
| virtual const char * | className () const |
| Returns the name of the class. | |
| TextureUnit (int texunit) | |
| virtual ERenderState | type () const |
| virtual void | apply (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) |
| Texture * | texture () |
| const Texture * | texture () const |
| bool | hasTexture () const |
Protected Attributes | |
| ref< Texture > | mTexture |
The TextureUnit class associates a Texture object to an OpenGL texture unit.
Definition at line 1154 of file Shader.hpp.
| vl::TextureUnit::TextureUnit | ( | int | texunit ) | [inline] |
Definition at line 1158 of file Shader.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
| virtual const char* vl::TextureUnit::className | ( | ) | const [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::TextureState.
Definition at line 1157 of file Shader.hpp.
| virtual ERenderState vl::TextureUnit::type | ( | ) | const [inline, virtual] |
Reimplemented from vl::RenderState.
Definition at line 1164 of file Shader.hpp.
References vl::RS_TextureUnit0.
| void TextureUnit::apply | ( | 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 1028 of file Shader.cpp.
References vl::TexParameter::apply(), vl::Log::bug(), vl::Texture::dimension(), vl::Texture::getTexParameter(), vl::glGetTexLevelParameteriv(), vl::Has_Fixed_Function_Pipeline, hasTexture(), vl::Object::objectName(), 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::TextureState::textureUnit(), 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::VL_glActiveTexture(), VL_MAX_TEXTURE_UNITS, and VL_TRAP.
| void vl::TextureUnit::setTexture | ( | Texture * | texture ) | [inline] |
Definition at line 1167 of file Shader.hpp.
| Texture* vl::TextureUnit::texture | ( | ) | [inline] |
Definition at line 1168 of file Shader.hpp.
Referenced by apply(), and vl::Rendering::fillRenderQueue().
| const Texture* vl::TextureUnit::texture | ( | ) | const [inline] |
Definition at line 1169 of file Shader.hpp.
| bool TextureUnit::hasTexture | ( | ) | const |
ref<Texture> vl::TextureUnit::mTexture [protected] |
Definition at line 1174 of file Shader.hpp.
Referenced by hasTexture().