#include <RenderLoop.hpp>
◆ RenderLoop()
C3D_API castor3d::RenderLoop::RenderLoop |
( |
Engine & |
engine, |
|
|
uint32_t |
wantedFPS, |
|
|
bool |
isAsync |
|
) |
| |
Constructor.
- Parameters
-
[in] | engine | The engine. |
[in] | wantedFPS | The wanted FPS count. |
[in] | isAsync | Tells if the render loop is asynchronous. |
◆ ~RenderLoop()
virtual C3D_API castor3d::RenderLoop::~RenderLoop |
( |
| ) |
|
|
virtual |
◆ beginRendering()
virtual C3D_API void castor3d::RenderLoop::beginRendering |
( |
| ) |
|
|
pure virtual |
◆ cleanup()
C3D_API void castor3d::RenderLoop::cleanup |
( |
| ) |
|
Cleans up the render loop.
◆ doRenderFrame()
C3D_API void castor3d::RenderLoop::doRenderFrame |
( |
castor::Milliseconds |
tslf = 0_ms | ) |
|
|
protected |
Starts threaded render loop.
- Parameters
-
[in] | tslf | The time elapsed since last frame. |
◆ dumpFrameTimes()
The average frame time, in nanoseconds.
◆ enableVSync()
virtual C3D_API void castor3d::RenderLoop::enableVSync |
( |
bool |
enable | ) |
|
|
virtual |
◆ endRendering()
virtual C3D_API void castor3d::RenderLoop::endRendering |
( |
| ) |
|
|
pure virtual |
◆ flushEvents()
C3D_API void castor3d::RenderLoop::flushEvents |
( |
| ) |
|
Flushs all events of all frame listeners.
◆ getAvgFrameTime()
C3D_API castor::Nanoseconds castor3d::RenderLoop::getAvgFrameTime |
( |
| ) |
const |
- Returns
- The average frame time, in nanoseconds.
◆ getFrameTime()
castor::Milliseconds castor3d::RenderLoop::getFrameTime |
( |
| ) |
const |
|
inline |
- Returns
- The wanted frame time, in milliseconds.
References m_frameTime.
◆ getLastFrameTime()
castor::Microseconds castor3d::RenderLoop::getLastFrameTime |
( |
| ) |
const |
|
inline |
◆ getWantedFps()
uint32_t castor3d::RenderLoop::getWantedFps |
( |
| ) |
const |
|
inline |
- Returns
- The wanted refresh rate.
References m_wantedFPS.
◆ hasDebugOverlays()
C3D_API bool castor3d::RenderLoop::hasDebugOverlays |
( |
| ) |
const |
- Returns
- The debug overlays shown status.
◆ pause()
virtual C3D_API void castor3d::RenderLoop::pause |
( |
| ) |
|
|
pure virtual |
◆ registerBuffer()
◆ registerTimer()
C3D_API uint32_t castor3d::RenderLoop::registerTimer |
( |
castor::String const & |
category, |
|
|
FramePassTimer & |
timer |
|
) |
| |
Registers a render pass timer.
- Parameters
-
[in] | category | The timer category name. |
[in] | timer | The timer to register. |
- Returns
- The query ID.
◆ renderSyncFrame()
virtual C3D_API void castor3d::RenderLoop::renderSyncFrame |
( |
castor::Milliseconds |
tslf = 0_ms | ) |
|
|
pure virtual |
◆ resume()
virtual C3D_API void castor3d::RenderLoop::resume |
( |
| ) |
|
|
pure virtual |
◆ showDebugOverlays()
C3D_API void castor3d::RenderLoop::showDebugOverlays |
( |
bool |
show | ) |
|
Show or hide debug overlays.
- Parameters
-
◆ unregisterBuffer()
◆ unregisterTimer()
C3D_API void castor3d::RenderLoop::unregisterTimer |
( |
castor::String const & |
category, |
|
|
FramePassTimer & |
timer |
|
) |
| |
Unregisters a render pass timer.
- Parameters
-
[in] | category | The timer category name. |
[in] | timer | The timer to unregister. |
◆ m_currentUpdate
uint32_t castor3d::RenderLoop::m_currentUpdate { 0u } |
|
protected |
◆ m_debugOverlays
std::unique_ptr< DebugOverlays > castor3d::RenderLoop::m_debugOverlays |
|
protected |
◆ m_debugOverlaysMtx
std::mutex castor3d::RenderLoop::m_debugOverlaysMtx |
|
protected |
◆ m_frameTime
castor::Milliseconds castor3d::RenderLoop::m_frameTime |
|
protected |
◆ m_lastFrameTime
std::atomic< castor::Microseconds > castor3d::RenderLoop::m_lastFrameTime |
|
protected |
◆ m_renderSystem
◆ m_toWait
crg::SemaphoreWaitArray castor3d::RenderLoop::m_toWait |
|
protected |
◆ m_uploadResources
◆ m_wantedFPS
uint32_t castor3d::RenderLoop::m_wantedFPS |
|
protected |
The wanted FPS, used in threaded render mode.
Referenced by getWantedFps().
◆ UnlimitedFPS
constexpr uint32_t castor3d::RenderLoop::UnlimitedFPS = 0xFFFFFFFFu |
|
staticconstexpr |
The documentation for this class was generated from the following file: