Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The TextureImageUnit class associates a Texture object to an OpenGL texture unit. More...
#include <Shader.hpp>
Public Member Functions | |
TextureImageUnit () | |
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. More... | |
void | setTexture (Texture *texture) |
The texture sampler by a texture unit. More... | |
Texture * | texture () |
The texture sampler by a texture unit. More... | |
const Texture * | texture () const |
The texture sampler by a texture unit. More... | |
bool | hasTexture () const |
virtual ref< RenderState > | clone () const |
Public Member Functions inherited from vl::RenderStateIndexed | |
RenderStateIndexed () | |
Public Member Functions inherited from vl::RenderState | |
RenderState () | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Static Public Member Functions | |
static void | reset (int index, OpenGLContext *ctx) |
Reset texture sampler to it's default disabled state. More... | |
Protected Attributes | |
ref< Texture > | mTexture |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
The TextureImageUnit class associates a Texture object to an OpenGL texture unit.
Definition at line 1747 of file Shader.hpp.
|
inline |
Definition at line 1752 of file Shader.hpp.
|
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 1111 of file Shader.cpp.
References vl::Log::bug(), vl::Has_Fixed_Function_Pipeline, 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, 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, and VL_TRAP.
Referenced by reset().
|
inlinevirtual |
Implements vl::RenderState.
Definition at line 1775 of file Shader.hpp.
bool TextureImageUnit::hasTexture | ( | ) | const |
Definition at line 1106 of file Shader.cpp.
|
inlinestatic |
Reset texture sampler to it's default disabled state.
Definition at line 1761 of file Shader.hpp.
|
inline |
The texture sampler by a texture unit.
Definition at line 1765 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_TextureImageUnit::importTextureSampler(), vl::Terrain::init(), vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::VectorGraphics::popScissor().
|
inline |
The texture sampler by a texture unit.
Definition at line 1768 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_TextureImageUnit::exportTextureSampler(), vl::Rendering::fillRenderQueue(), vl::Terrain::init(), and vl::RaycastVolume::updateUniforms().
|
inline |
The texture sampler by a texture unit.
Definition at line 1771 of file Shader.hpp.
|
inlinevirtual |
Reimplemented from vl::RenderState.
Definition at line 1757 of file Shader.hpp.
References vl::RS_TextureImageUnit.
Definition at line 1783 of file Shader.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:55.
© Copyright Michele Bosi. All rights reserved.