Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::RenderStateSet Class Reference

A set of RenderState objects managed by a Shader. More...

#include <RenderStateSet.hpp>

+ Inheritance diagram for vl::RenderStateSet:

Public Member Functions

 RenderStateSet ()
 
RenderStateSetdeepCopyFrom (const RenderStateSet &other)
 
RenderStateSetshallowCopyFrom (const RenderStateSet &other)
 
void setRenderState (RenderState *renderstate, int index)
 
RenderStaterenderState (ERenderState type, int index=-1)
 
const RenderStaterenderState (ERenderState type, int index=-1) const
 
size_t renderStatesCount () const
 
const RenderStateSlotrenderStates () const
 
RenderStateSlotrenderStates ()
 
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 GLSLProgramglslProgram () const
 Returns the GLSLProgram associated to a RenderStateSet (if any) More...
 
GLSLProgramglslProgram ()
 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...
 
Objectoperator= (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...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () 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< RenderStateSlotmRenderStates
 
GLSLProgrammGLSLProgram
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

A set of RenderState objects managed by a Shader.

See also
Shader, Effect, Actor

Definition at line 48 of file RenderStateSet.hpp.

Constructor & Destructor Documentation

◆ RenderStateSet()

vl::RenderStateSet::RenderStateSet ( )
inline

Definition at line 53 of file RenderStateSet.hpp.

Member Function Documentation

◆ deepCopyFrom()

RenderStateSet & RenderStateSet::deepCopyFrom ( const RenderStateSet other)

Definition at line 39 of file RenderStateSet.cpp.

References mRenderStates.

Referenced by vl::Shader::deepCopyFrom().

◆ eraseAllRenderStates()

void vl::RenderStateSet::eraseAllRenderStates ( )
inline

Definition at line 79 of file RenderStateSet.hpp.

References NULL.

◆ eraseRenderState()

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.

◆ glslProgram() [1/2]

const GLSLProgram* vl::RenderStateSet::glslProgram ( ) const
inline

Returns the GLSLProgram associated to a RenderStateSet (if any)

Definition at line 82 of file RenderStateSet.hpp.

Referenced by vl::Renderer::renderRaw().

◆ glslProgram() [2/2]

GLSLProgram* vl::RenderStateSet::glslProgram ( )
inline

Returns the GLSLProgram associated to a RenderStateSet (if any)

Definition at line 85 of file RenderStateSet.hpp.

◆ renderState() [1/2]

RenderState * RenderStateSet::renderState ( ERenderState  type,
int  index = -1 
)

◆ renderState() [2/2]

const RenderState * RenderStateSet::renderState ( ERenderState  type,
int  index = -1 
) const

Definition at line 74 of file RenderStateSet.cpp.

References mRenderStates, and NULL.

◆ renderStates() [1/2]

const RenderStateSlot* vl::RenderStateSet::renderStates ( ) const
inline

◆ renderStates() [2/2]

RenderStateSlot* vl::RenderStateSet::renderStates ( )
inline

Definition at line 74 of file RenderStateSet.hpp.

References NULL.

◆ renderStatesCount()

size_t vl::RenderStateSet::renderStatesCount ( ) const
inline

◆ setRenderState()

void RenderStateSet::setRenderState ( RenderState renderstate,
int  index 
)

◆ shallowCopyFrom()

RenderStateSet& vl::RenderStateSet::shallowCopyFrom ( const RenderStateSet other)
inline

Definition at line 60 of file RenderStateSet.hpp.

References mGLSLProgram, and mRenderStates.

Referenced by vl::Shader::shallowCopyFrom().

Member Data Documentation

◆ mGLSLProgram

GLSLProgram* vl::RenderStateSet::mGLSLProgram
protected

Definition at line 89 of file RenderStateSet.hpp.

Referenced by eraseRenderState(), setRenderState(), and shallowCopyFrom().

◆ mRenderStates

std::vector< RenderStateSlot > vl::RenderStateSet::mRenderStates
protected

The documentation for this class was generated from the following files: