Castor3D 0.16.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.
 
virtual C3D_API ~FrameListener () noexcept
 Destructor.
 
C3D_API void flush ()
 Empties the event lists.
 
C3D_API CpuFrameEventpostEvent (CpuFrameEventUPtr event)
 Puts an event in the corresponding array.
 
C3D_API GpuFrameEventpostEvent (GpuFrameEventUPtr event)
 Puts an event in the corresponding array.
 
C3D_API bool fireEvents (CpuEventType type)
 Applies all events of a given type, then discards them.
 
C3D_API bool fireEvents (GpuEventType type, RenderDevice const &device, QueueData const &queueData)
 Applies all events of a given type, then discards them.
 
C3D_API void flushEvents (CpuEventType type)
 Discards all events of a given type.
 
C3D_API void flushEvents (GpuEventType type)
 Discards all events of a given type.
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Protected Member Functions

virtual C3D_API void doFlush ()
 Empties the event lists.
 

Protected Attributes

castor::Array< CpuFrameEventPtrArray, size_t(CpuEventType::eCount) > m_cpuEvents
 
castor::Array< GpuFrameEventPtrArray, size_t(GpuEventType::eCount) > m_gpuEvents
 
castor::RecursiveMutex m_mutex
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

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 ( )
virtualnoexcept

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 ( CpuEventType 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 ( GpuEventType 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() [1/2]

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

Discards all events of a given type.

Parameters
[in]typeThe type of events to fire.

◆ flushEvents() [2/2]

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

Discards all events of a given type.

Parameters
[in]typeThe type of events to fire.

◆ postEvent() [1/2]

C3D_API CpuFrameEvent * 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 GpuFrameEvent * castor3d::FrameListener::postEvent ( GpuFrameEventUPtr event)

Puts an event in the corresponding array.

Parameters
[in]eventThe event to put.

Member Data Documentation

◆ m_cpuEvents

castor::Array< CpuFrameEventPtrArray, size_t( CpuEventType::eCount ) > castor3d::FrameListener::m_cpuEvents
protected

The CPU events arrays.

◆ m_gpuEvents

castor::Array< GpuFrameEventPtrArray, size_t( GpuEventType::eCount ) > castor3d::FrameListener::m_gpuEvents
protected

The GPU events arrays.

◆ m_mutex

castor::RecursiveMutex castor3d::FrameListener::m_mutex
protected

Mutex to make this class thread safe.


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