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::RendererAbstract Class Referenceabstract

Base class providing all the basic funtionalities of a Renderer. More...

#include <RendererAbstract.hpp>

+ Inheritance diagram for vl::RendererAbstract:

Public Member Functions

 RendererAbstract ()
 
RendererAbstractoperator= (const RendererAbstract &other)
 
virtual const RenderQueuerender (const RenderQueue *in_render_queue, Camera *camera, real frame_clock)=0
 Takes as input the render queue to render and returns a possibly filtered render queue for further processing. More...
 
virtual const Framebufferframebuffer () const =0
 The Framebuffer on which the rendering is performed. More...
 
virtual Framebufferframebuffer ()=0
 The Framebuffer on which the rendering is performed. More...
 
void dispatchOnRendererStarted ()
 Dispatches the onRendererStarted() event to the registered RenderEventCallback objects. More...
 
void dispatchOnRendererFinished ()
 Dispatches the onRendererFinished() event to the registered RenderEventCallback objects. More...
 
Collection< RenderEventCallback > * onFinishedCallbacks ()
 Returns the list of RenderEventCallback objects registered to onRendererFinished() event notification. More...
 
const Collection< RenderEventCallback > * onFinishedCallbacks () const
 Returns the list of RenderEventCallback objects registered to onRendererFinished() event notification. More...
 
Collection< RenderEventCallback > * onStartedCallbacks ()
 Returns the list of RenderEventCallback objects registered to onRendererStarted() event notification. More...
 
const Collection< RenderEventCallback > * onStartedCallbacks () const
 Returns the list of RenderEventCallback objects registered to onRendererStarted() event notification. More...
 
unsigned long renderTick () const
 The current render tick number, equivalent to the number or calls made to the render() method. More...
 
void incrementRenderTick ()
 Increments the rendering tick count. More...
 
void setClearFlags (EClearFlags clear_flags)
 The clear flags used to clear the viewport. More...
 
EClearFlags clearFlags () const
 The clear flags used to clear the viewport. More...
 
void setEnableMask (unsigned int mask)
 Enable mask used to enable/disable the rendering of matching Actors. More...
 
unsigned int enableMask () const
 Enable mask used to enable/disable the rendering of matching Actors. More...
 
void setFrameClock (real t)
 The current rendring frame time. More...
 
real frameClock () const
 The current rendring frame time. 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

ref< Collection< RenderEventCallback > > mOnFinishedCallbacks
 
ref< Collection< RenderEventCallback > > mOnStartedCallbacks
 
unsigned long mRenderTick
 
unsigned int mEnableMask
 
EClearFlags mClearFlags
 
real mFrameClock
 
- 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

Base class providing all the basic funtionalities of a Renderer.

Definition at line 51 of file RendererAbstract.hpp.

Constructor & Destructor Documentation

◆ RendererAbstract()

vl::RendererAbstract::RendererAbstract ( )
inline

Definition at line 56 of file RendererAbstract.hpp.

References vl::CF_CLEAR_COLOR_DEPTH.

Member Function Documentation

◆ clearFlags()

EClearFlags vl::RendererAbstract::clearFlags ( ) const
inline

The clear flags used to clear the viewport.

Definition at line 138 of file RendererAbstract.hpp.

Referenced by vl::Renderer::render(), and vl::EdgeRenderer::render().

◆ dispatchOnRendererFinished()

void vl::RendererAbstract::dispatchOnRendererFinished ( )
inline

Dispatches the onRendererFinished() event to the registered RenderEventCallback objects.

Definition at line 103 of file RendererAbstract.hpp.

References vl::Collection< T >::eraseAt(), and vl::Collection< T >::size().

Referenced by vl::OcclusionCullRenderer::render(), vl::Renderer::render(), and vl::EdgeRenderer::render().

◆ dispatchOnRendererStarted()

void vl::RendererAbstract::dispatchOnRendererStarted ( )
inline

Dispatches the onRendererStarted() event to the registered RenderEventCallback objects.

Definition at line 89 of file RendererAbstract.hpp.

References vl::Collection< T >::eraseAt(), and vl::Collection< T >::size().

Referenced by vl::OcclusionCullRenderer::render(), vl::Renderer::render(), and vl::EdgeRenderer::render().

◆ enableMask()

unsigned int vl::RendererAbstract::enableMask ( ) const
inline

Enable mask used to enable/disable the rendering of matching Actors.

Definition at line 144 of file RendererAbstract.hpp.

Referenced by vl::OcclusionCullRenderer::render(), vl::Renderer::render(), vl::EdgeRenderer::render(), and vl::OcclusionCullRenderer::render_pass2().

◆ framebuffer() [1/2]

virtual const Framebuffer* vl::RendererAbstract::framebuffer ( ) const
pure virtual

The Framebuffer on which the rendering is performed.

Implemented in vl::Renderer, and vl::OcclusionCullRenderer.

Referenced by vl::EdgeRenderer::render().

◆ framebuffer() [2/2]

virtual Framebuffer* vl::RendererAbstract::framebuffer ( )
pure virtual

The Framebuffer on which the rendering is performed.

Implemented in vl::Renderer, and vl::OcclusionCullRenderer.

◆ frameClock()

real vl::RendererAbstract::frameClock ( ) const
inline

The current rendring frame time.

vl::Renderer passes this value to ActorEventCallback::onActorRenderStarted()

Definition at line 150 of file RendererAbstract.hpp.

◆ incrementRenderTick()

void vl::RendererAbstract::incrementRenderTick ( )
inline

Increments the rendering tick count.

Definition at line 132 of file RendererAbstract.hpp.

Referenced by vl::OcclusionCullRenderer::render(), and vl::EdgeRenderer::render().

◆ onFinishedCallbacks() [1/2]

Collection<RenderEventCallback>* vl::RendererAbstract::onFinishedCallbacks ( )
inline

Returns the list of RenderEventCallback objects registered to onRendererFinished() event notification.

Definition at line 117 of file RendererAbstract.hpp.

◆ onFinishedCallbacks() [2/2]

const Collection<RenderEventCallback>* vl::RendererAbstract::onFinishedCallbacks ( ) const
inline

Returns the list of RenderEventCallback objects registered to onRendererFinished() event notification.

Definition at line 120 of file RendererAbstract.hpp.

◆ onStartedCallbacks() [1/2]

Collection<RenderEventCallback>* vl::RendererAbstract::onStartedCallbacks ( )
inline

Returns the list of RenderEventCallback objects registered to onRendererStarted() event notification.

Definition at line 123 of file RendererAbstract.hpp.

◆ onStartedCallbacks() [2/2]

const Collection<RenderEventCallback>* vl::RendererAbstract::onStartedCallbacks ( ) const
inline

Returns the list of RenderEventCallback objects registered to onRendererStarted() event notification.

Definition at line 126 of file RendererAbstract.hpp.

◆ operator=()

RendererAbstract& vl::RendererAbstract::operator= ( const RendererAbstract other)
inline

◆ render()

virtual const RenderQueue* vl::RendererAbstract::render ( const RenderQueue in_render_queue,
Camera camera,
real  frame_clock 
)
pure virtual

Takes as input the render queue to render and returns a possibly filtered render queue for further processing.

Renderer's implementation of this function always returns in_render_queue.

Implemented in vl::EdgeRenderer, vl::Renderer, and vl::OcclusionCullRenderer.

◆ renderTick()

unsigned long vl::RendererAbstract::renderTick ( ) const
inline

The current render tick number, equivalent to the number or calls made to the render() method.

Definition at line 129 of file RendererAbstract.hpp.

◆ setClearFlags()

void vl::RendererAbstract::setClearFlags ( EClearFlags  clear_flags)
inline

The clear flags used to clear the viewport.

Definition at line 135 of file RendererAbstract.hpp.

◆ setEnableMask()

void vl::RendererAbstract::setEnableMask ( unsigned int  mask)
inline

Enable mask used to enable/disable the rendering of matching Actors.

Definition at line 141 of file RendererAbstract.hpp.

◆ setFrameClock()

void vl::RendererAbstract::setFrameClock ( real  t)
inline

The current rendring frame time.

vl::Renderer passes this value to ActorEventCallback::onActorRenderStarted()

Definition at line 147 of file RendererAbstract.hpp.

Member Data Documentation

◆ mClearFlags

EClearFlags vl::RendererAbstract::mClearFlags
protected

Definition at line 157 of file RendererAbstract.hpp.

Referenced by operator=().

◆ mEnableMask

unsigned int vl::RendererAbstract::mEnableMask
protected

Definition at line 156 of file RendererAbstract.hpp.

Referenced by operator=().

◆ mFrameClock

real vl::RendererAbstract::mFrameClock
protected

Definition at line 158 of file RendererAbstract.hpp.

◆ mOnFinishedCallbacks

ref< Collection<RenderEventCallback> > vl::RendererAbstract::mOnFinishedCallbacks
protected

Definition at line 153 of file RendererAbstract.hpp.

Referenced by operator=().

◆ mOnStartedCallbacks

ref< Collection<RenderEventCallback> > vl::RendererAbstract::mOnStartedCallbacks
protected

Definition at line 154 of file RendererAbstract.hpp.

Referenced by operator=().

◆ mRenderTick

unsigned long vl::RendererAbstract::mRenderTick
protected

Definition at line 155 of file RendererAbstract.hpp.

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


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