Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The ShaderNode class is used to conveniently manage complex hierarchies of Shader[s]. More...
#include <ShaderNode.hpp>
Classes | |
struct | EnableInfo |
ShaderNode's representation of an enable. More... | |
struct | RenderStateInfo |
ShaderNode's representation of a RenderState. More... | |
struct | UniformInfo |
ShaderNode's representation of a Uniform. More... | |
Public Types | |
typedef std::map< ERenderState, RenderStateInfo > | RenderStatesMap |
typedef std::map< EEnable, EnableInfo > | EnablesMap |
typedef std::map< std::string, UniformInfo > | UniformsMap |
Public Member Functions | |
ShaderNode () | |
void | setShader (Shader *shader) |
const Shader * | shader () const |
Shader * | shader () |
void | addChild (ShaderNode *node) |
void | eraseChild (ShaderNode *node) |
void | eraseChild (unsigned index) |
void | eraseChildren (unsigned start, unsigned count) |
int | findChild (const ShaderNode *node) const |
size_t | childrenCount () const |
ShaderNode * | child (unsigned i) |
const ShaderNode * | child (unsigned i) const |
ShaderNode * | parent () |
const ShaderNode * | parent () const |
void | updateHierarchy () |
void | inherit (ShaderNode *parent) |
void | setRenderState (EInheritance inheritance, RenderStateNonIndexed *rs) |
void | setRenderState (EInheritance inheritance, RenderState *rs, int index) |
void | eraseRenderState (RenderStateNonIndexed *rs) |
void | eraseRenderState (RenderState *rs, int index) |
void | setEnable (EEnable en, bool on, EInheritance inheritance=IN_Propagate) |
void | eraseEnable (EEnable en) |
void | setUniform (Uniform *unif, EInheritance inheritance=IN_Propagate) |
void | eraseUniform (Uniform *unif) |
const RenderStatesMap & | renderStates () const |
RenderStatesMap & | renderStates () |
const EnablesMap & | enables () const |
EnablesMap & | enables () |
const UniformsMap & | uniforms () const |
UniformsMap & | uniforms () |
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... | |
Protected Attributes | |
std::vector< ref< ShaderNode > > | mNodes |
ShaderNode * | mParent |
RenderStatesMap | mRenderStates |
EnablesMap | mEnables |
UniformsMap | mUniforms |
RenderStatesMap | mRenderStates_Final |
EnablesMap | mEnables_Final |
UniformsMap | mUniforms_Final |
ref< Shader > | mShader |
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 ShaderNode class is used to conveniently manage complex hierarchies of Shader[s].
Definition at line 45 of file ShaderNode.hpp.
typedef std::map< EEnable, EnableInfo > vl::ShaderNode::EnablesMap |
Definition at line 78 of file ShaderNode.hpp.
typedef std::map< ERenderState, RenderStateInfo > vl::ShaderNode::RenderStatesMap |
Definition at line 77 of file ShaderNode.hpp.
typedef std::map< std::string, UniformInfo > vl::ShaderNode::UniformsMap |
Definition at line 79 of file ShaderNode.hpp.
|
inline |
Definition at line 82 of file ShaderNode.hpp.
|
inline |
Definition at line 94 of file ShaderNode.hpp.
References mNodes, mParent, NULL, parent(), and VL_CHECK.
Referenced by vl::Terrain::init().
|
inline |
Definition at line 139 of file ShaderNode.hpp.
References mNodes.
Referenced by eraseChild(), findChild(), and updateHierarchy().
|
inline |
Definition at line 141 of file ShaderNode.hpp.
References mNodes.
|
inline |
Definition at line 137 of file ShaderNode.hpp.
References mNodes.
Referenced by eraseChild(), eraseChildren(), findChild(), and updateHierarchy().
|
inline |
Definition at line 313 of file ShaderNode.hpp.
References mEnables.
|
inline |
Definition at line 315 of file ShaderNode.hpp.
References mEnables.
|
inline |
Definition at line 101 of file ShaderNode.hpp.
References child(), childrenCount(), mNodes, mParent, NULL, parent(), and VL_CHECK.
|
inline |
Definition at line 113 of file ShaderNode.hpp.
References childrenCount(), mNodes, NULL, and VL_CHECK.
|
inline |
Definition at line 120 of file ShaderNode.hpp.
References childrenCount(), mNodes, mParent, NULL, and VL_CHECK.
|
inline |
Definition at line 291 of file ShaderNode.hpp.
References mEnables.
|
inline |
Definition at line 272 of file ShaderNode.hpp.
References mRenderStates, and vl::RenderState::type().
|
inline |
Definition at line 277 of file ShaderNode.hpp.
References mRenderStates, vl::RenderState::type(), and VL_CHECK.
|
inline |
Definition at line 302 of file ShaderNode.hpp.
References mUniforms, and vl::Uniform::name().
|
inline |
Definition at line 129 of file ShaderNode.hpp.
References child(), and childrenCount().
|
inline |
Definition at line 156 of file ShaderNode.hpp.
References vl::Shader::disableAll(), vl::Shader::enable(), vl::Shader::eraseAllRenderStates(), vl::Shader::eraseAllUniforms(), vl::IN_Propagate, vl::IN_Sticky, mEnables, mEnables_Final, mRenderStates, mRenderStates_Final, mShader, mUniforms, mUniforms_Final, vl::Shader::setRenderState(), and vl::Shader::setUniform().
Referenced by updateHierarchy().
|
inline |
Definition at line 143 of file ShaderNode.hpp.
References mParent.
Referenced by addChild(), eraseChild(), and updateHierarchy().
|
inline |
Definition at line 145 of file ShaderNode.hpp.
References mParent.
|
inline |
Definition at line 309 of file ShaderNode.hpp.
References mRenderStates.
|
inline |
Definition at line 311 of file ShaderNode.hpp.
References mRenderStates.
|
inline |
Definition at line 285 of file ShaderNode.hpp.
References mEnables.
Referenced by vl::Terrain::init().
|
inline |
Definition at line 260 of file ShaderNode.hpp.
References mRenderStates, and vl::RenderState::type().
Referenced by vl::Terrain::init().
|
inline |
Definition at line 266 of file ShaderNode.hpp.
References mRenderStates, and vl::RenderState::type().
|
inline |
Definition at line 86 of file ShaderNode.hpp.
References mShader, and shader().
Referenced by vl::Terrain::init().
|
inline |
Definition at line 296 of file ShaderNode.hpp.
References mUniforms, and vl::Uniform::name().
|
inline |
Definition at line 88 of file ShaderNode.hpp.
References vl::ref< T >::get(), and mShader.
Referenced by setShader().
|
inline |
Definition at line 90 of file ShaderNode.hpp.
References vl::ref< T >::get(), and mShader.
|
inline |
Definition at line 317 of file ShaderNode.hpp.
References mUniforms.
|
inline |
Definition at line 319 of file ShaderNode.hpp.
References mUniforms.
|
inline |
Definition at line 149 of file ShaderNode.hpp.
References child(), childrenCount(), inherit(), parent(), and updateHierarchy().
Referenced by vl::Terrain::init(), and updateHierarchy().
|
protected |
Definition at line 326 of file ShaderNode.hpp.
Referenced by enables(), eraseEnable(), inherit(), and setEnable().
|
protected |
Definition at line 330 of file ShaderNode.hpp.
Referenced by inherit().
|
protected |
Definition at line 322 of file ShaderNode.hpp.
Referenced by addChild(), child(), childrenCount(), eraseChild(), and eraseChildren().
|
protected |
Definition at line 323 of file ShaderNode.hpp.
Referenced by addChild(), eraseChild(), eraseChildren(), and parent().
|
protected |
Definition at line 325 of file ShaderNode.hpp.
Referenced by eraseRenderState(), inherit(), renderStates(), and setRenderState().
|
protected |
Definition at line 329 of file ShaderNode.hpp.
Referenced by inherit().
Definition at line 333 of file ShaderNode.hpp.
Referenced by inherit(), setShader(), and shader().
|
protected |
Definition at line 327 of file ShaderNode.hpp.
Referenced by eraseUniform(), inherit(), setUniform(), and uniforms().
|
protected |
Definition at line 331 of file ShaderNode.hpp.
Referenced by inherit().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:54.
© Copyright Michele Bosi. All rights reserved.