Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::DebugOverlays Class Reference

#include <DebugOverlays.hpp>

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

Public Member Functions

 DebugOverlays (Engine &engine)
 Constructor.
 
void cleanup ()
 Clean up function.
 
RenderInfobeginFrame ()
 Resets all frame counters.
 
castor::Microseconds endFrame (bool first)
 Updates the overlays texts.
 
void endGpuTasks ()
 Collects all GPU times.
 
void endCpuTask ()
 Used to add to the GPU time, the time elapsed between now and the last call of either endGpuTask or endCpuTask.
 
void show (bool show)
 Show or hide debug overlays.
 
void registerTimer (castor::String const &category, FramePassTimer &timer)
 Registers a render pass timer.
 
void unregisterTimer (castor::String const &category, FramePassTimer &timer)
 Unregisters a render pass timer.
 
void dumpFrameTimes (Parameters &params)
 Fills the parameters with all passes times, in nanoseconds.
 
bool isShown () const
 
castor::Nanoseconds getAvgFrameTime () const
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Constructor & Destructor Documentation

◆ DebugOverlays()

castor3d::DebugOverlays::DebugOverlays ( Engine & engine)
explicit

Constructor.

Parameters
[in]engineThe engine.

Member Function Documentation

◆ beginFrame()

RenderInfo & castor3d::DebugOverlays::beginFrame ( )

Resets all frame counters.

Returns
The render infos.

◆ cleanup()

void castor3d::DebugOverlays::cleanup ( )

Clean up function.

◆ dumpFrameTimes()

void castor3d::DebugOverlays::dumpFrameTimes ( Parameters & params)

Fills the parameters with all passes times, in nanoseconds.

Parameters
[in,out]paramsReceives the times.

◆ endCpuTask()

void castor3d::DebugOverlays::endCpuTask ( )

Used to add to the GPU time, the time elapsed between now and the last call of either endGpuTask or endCpuTask.

◆ endFrame()

castor::Microseconds castor3d::DebugOverlays::endFrame ( bool first)

Updates the overlays texts.

Parameters
[in]firstTells if this is the first pass.
Returns
The elapsed time for this frame.

◆ endGpuTasks()

void castor3d::DebugOverlays::endGpuTasks ( )

Collects all GPU times.

◆ getAvgFrameTime()

castor::Nanoseconds castor3d::DebugOverlays::getAvgFrameTime ( ) const
inline

◆ isShown()

bool castor3d::DebugOverlays::isShown ( ) const
inline
Returns
The debug overlays shown status.

◆ registerTimer()

void castor3d::DebugOverlays::registerTimer ( castor::String const & category,
FramePassTimer & timer )

Registers a render pass timer.

Parameters
[in]categoryThe timer category name.
[in]timerThe timer to register.

◆ show()

void castor3d::DebugOverlays::show ( bool show)

Show or hide debug overlays.

Parameters
[in]showThe status.

◆ unregisterTimer()

void castor3d::DebugOverlays::unregisterTimer ( castor::String const & category,
FramePassTimer & timer )

Unregisters a render pass timer.

Parameters
[in]categoryThe timer category name.
[in]timerThe timer to unregister.

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