Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A set of RenderState objects managed by a Shader. More...
#include <RenderStateSet.hpp>
Public Member Functions | |
RenderStateSet () | |
RenderStateSet & | deepCopyFrom (const RenderStateSet &other) |
RenderStateSet & | shallowCopyFrom (const RenderStateSet &other) |
void | setRenderState (RenderState *renderstate, int index) |
RenderState * | renderState (ERenderState type, int index=-1) |
const RenderState * | renderState (ERenderState type, int index=-1) const |
size_t | renderStatesCount () const |
const RenderStateSlot * | renderStates () const |
RenderStateSlot * | renderStates () |
void | eraseRenderState (ERenderState type, int index) |
If index == -1 all the renderstates of the given type are removed regardless of their binding index. More... | |
void | eraseAllRenderStates () |
const GLSLProgram * | glslProgram () const |
Returns the GLSLProgram associated to a RenderStateSet (if any) More... | |
GLSLProgram * | glslProgram () |
Returns the GLSLProgram associated to a RenderStateSet (if any) More... | |
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< RenderStateSlot > | mRenderStates |
GLSLProgram * | mGLSLProgram |
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 () |
A set of RenderState objects managed by a Shader.
Definition at line 48 of file RenderStateSet.hpp.
|
inline |
Definition at line 53 of file RenderStateSet.hpp.
RenderStateSet & RenderStateSet::deepCopyFrom | ( | const RenderStateSet & | other | ) |
Definition at line 39 of file RenderStateSet.cpp.
References mRenderStates.
Referenced by vl::Shader::deepCopyFrom().
|
inline |
Definition at line 79 of file RenderStateSet.hpp.
References NULL.
void RenderStateSet::eraseRenderState | ( | ERenderState | type, |
int | index | ||
) |
If index == -1 all the renderstates of the given type are removed regardless of their binding index.
Definition at line 82 of file RenderStateSet.cpp.
References mGLSLProgram, mRenderStates, NULL, and vl::RS_GLSLProgram.
|
inline |
Returns the GLSLProgram associated to a RenderStateSet (if any)
Definition at line 82 of file RenderStateSet.hpp.
Referenced by vl::Renderer::renderRaw().
|
inline |
Returns the GLSLProgram associated to a RenderStateSet (if any)
Definition at line 85 of file RenderStateSet.hpp.
RenderState * RenderStateSet::renderState | ( | ERenderState | type, |
int | index = -1 |
||
) |
Definition at line 66 of file RenderStateSet.cpp.
References mRenderStates, and NULL.
Referenced by vl::Shader::getClipPlane(), vl::Shader::getGLSLProgram(), vl::Shader::getLight(), and vl::Shader::getVertexAttrib().
const RenderState * RenderStateSet::renderState | ( | ERenderState | type, |
int | index = -1 |
||
) | const |
Definition at line 74 of file RenderStateSet.cpp.
References mRenderStates, and NULL.
|
inline |
Definition at line 72 of file RenderStateSet.hpp.
References NULL.
Referenced by vl::OpenGLContext::applyRenderStates(), vlX::VLXClassWrapper_Shader::exportShader(), and vl::Rendering::fillRenderQueue().
|
inline |
Definition at line 74 of file RenderStateSet.hpp.
References NULL.
|
inline |
Definition at line 70 of file RenderStateSet.hpp.
Referenced by vl::OpenGLContext::applyRenderStates(), vlX::VLXClassWrapper_Shader::exportShader(), and vl::Rendering::fillRenderQueue().
void RenderStateSet::setRenderState | ( | RenderState * | renderstate, |
int | index | ||
) |
Definition at line 47 of file RenderStateSet.cpp.
References mGLSLProgram, mRenderStates, vl::RS_GLSLProgram, and vl::RenderState::type().
|
inline |
Definition at line 60 of file RenderStateSet.hpp.
References mGLSLProgram, and mRenderStates.
Referenced by vl::Shader::shallowCopyFrom().
|
protected |
Definition at line 89 of file RenderStateSet.hpp.
Referenced by eraseRenderState(), setRenderState(), and shallowCopyFrom().
|
protected |
Definition at line 88 of file RenderStateSet.hpp.
Referenced by deepCopyFrom(), eraseRenderState(), renderState(), setRenderState(), and shallowCopyFrom().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:11.
© Copyright Michele Bosi. All rights reserved.