Castor3D 0.12.0
Multiplatform 3D engine
Classes | 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. More...
 
 ~DebugOverlays ()
 Destructor. More...
 
void initialise (OverlayCache &cache)
 Initialisation function, retrieves the overlays from the given overlay cache. More...
 
void cleanup ()
 Clean up function. More...
 
RenderInfobeginFrame ()
 Resets all frame counters. More...
 
castor::Microseconds endFrame (bool first)
 Updates the overlays texts. More...
 
void endGpuTask ()
 Used to add to the GPU time, the time elapsed between now and the last call of either endGpuTask or endCpuTask. More...
 
void endCpuTask ()
 Used to add to the GPU time, the time elapsed between now and the last call of either endGpuTask or endCpuTask. More...
 
void show (bool show)
 Show or hide debug overlays. More...
 
uint32_t registerTimer (castor::String const &category, FramePassTimer &timer)
 Registers a render pass timer. More...
 
void unregisterTimer (castor::String const &category, FramePassTimer &timer)
 Unregisters a render pass timer. More...
 
void dumpFrameTimes (Parameters &params)
 Fills the parameters with all passes times, in nanoseconds. More...
 
bool isShown () const
 
castor::Nanoseconds getAvgFrameTime () const
 

Constructor & Destructor Documentation

◆ DebugOverlays()

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

Constructor.

Parameters
[in]engineThe engine.

◆ ~DebugOverlays()

castor3d::DebugOverlays::~DebugOverlays ( )

Destructor.

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.

◆ endGpuTask()

void castor3d::DebugOverlays::endGpuTask ( )

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

◆ getAvgFrameTime()

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

◆ initialise()

void castor3d::DebugOverlays::initialise ( OverlayCache cache)

Initialisation function, retrieves the overlays from the given overlay cache.

Parameters
[in]cacheThe overlay cache.

◆ isShown()

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

◆ registerTimer()

uint32_t 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.
Returns
The query ID.

◆ 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: