Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::FrameListener Class Reference

#include <FrameListener.hpp>

Inheritance diagram for castor3d::FrameListener:
Inheritance graph
[legend]
Collaboration diagram for castor3d::FrameListener:
Collaboration graph
[legend]

Public Member Functions

C3D_API FrameListener (castor::String const &name)
 Constructor. More...
 
virtual C3D_API ~FrameListener ()
 Destructor. More...
 
C3D_API void flush ()
 Empties the event lists. More...
 
C3D_API void postEvent (CpuFrameEventUPtr event)
 Puts an event in the corresponding array. More...
 
C3D_API void postEvent (GpuFrameEventUPtr event)
 Puts an event in the corresponding array. More...
 
C3D_API bool fireEvents (EventType type, RenderDevice const &device, QueueData const &queueData)
 Applies all events of a given type, then discards them. More...
 
C3D_API bool fireEvents (EventType type)
 Applies all events of a given type, then discards them. More...
 
C3D_API void flushEvents (EventType type)
 Discards all events of a given type. More...
 

Protected Member Functions

virtual C3D_API void doFlush ()
 Empties the event lists. More...
 

Protected Attributes

std::array< CpuFrameEventPtrArray, size_t(EventType::eCount) > m_cpuEvents
 
std::array< GpuFrameEventPtrArray, size_t(EventType::eCount) > m_gpuEvents
 
std::recursive_mutex m_mutex
 

Constructor & Destructor Documentation

◆ FrameListener()

C3D_API castor3d::FrameListener::FrameListener ( castor::String const &  name)
explicit

Constructor.

Parameters
[in]nameThe listener's name.

◆ ~FrameListener()

virtual C3D_API castor3d::FrameListener::~FrameListener ( )
virtual

Destructor.

Member Function Documentation

◆ doFlush()

virtual C3D_API void castor3d::FrameListener::doFlush ( )
inlineprotectedvirtual

Empties the event lists.

◆ fireEvents() [1/2]

C3D_API bool castor3d::FrameListener::fireEvents ( EventType  type)

Applies all events of a given type, then discards them.

Parameters
[in]typeThe type of events to fire.
Returns
true si tous les évènements se sont exécutés sans erreur.

◆ fireEvents() [2/2]

C3D_API bool castor3d::FrameListener::fireEvents ( EventType  type,
RenderDevice const &  device,
QueueData const &  queueData 
)

Applies all events of a given type, then discards them.

Parameters
[in]typeThe type of events to fire.
[in]deviceThe GPU device.
[in]queueDataThe queue receiving the GPU commands.
Returns
true si tous les évènements se sont exécutés sans erreur.

◆ flush()

C3D_API void castor3d::FrameListener::flush ( )

Empties the event lists.

◆ flushEvents()

C3D_API void castor3d::FrameListener::flushEvents ( EventType  type)

Discards all events of a given type.

Parameters
[in]typeThe type of events to fire.

◆ postEvent() [1/2]

C3D_API void castor3d::FrameListener::postEvent ( CpuFrameEventUPtr  event)

Puts an event in the corresponding array.

Parameters
[in]eventThe event to put.

Referenced by castor3d::CpuEventInitialiserT< CacheT >::operator()(), castor3d::CpuEventCleanerT< CacheT >::operator()(), castor3d::GpuEventInitialiserT< CacheT >::operator()(), and castor3d::GpuEventCleanerT< CacheT >::operator()().

Here is the caller graph for this function:

◆ postEvent() [2/2]

C3D_API void castor3d::FrameListener::postEvent ( GpuFrameEventUPtr  event)

Puts an event in the corresponding array.

Parameters
[in]eventThe event to put.

Member Data Documentation

◆ m_cpuEvents

std::array< CpuFrameEventPtrArray, size_t( EventType::eCount ) > castor3d::FrameListener::m_cpuEvents
protected

The CPU events arrays.

◆ m_gpuEvents

std::array< GpuFrameEventPtrArray, size_t( EventType::eCount ) > castor3d::FrameListener::m_gpuEvents
protected

The GPU events arrays.

◆ m_mutex

std::recursive_mutex castor3d::FrameListener::m_mutex
protected

Mutex to make this class thread safe.


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