Castor3D 0.16.0
Multiplatform 3D engine
|
#include <RenderLoopSync.hpp>
Public Member Functions | |
C3D_API | RenderLoopSync (Engine &engine, uint32_t wantedFPS) |
Constructor. | |
C3D_API | ~RenderLoopSync () noexcept override |
Destructor. | |
C3D_API void | beginRendering () override |
Starts threaded render loop. | |
C3D_API void | renderSyncFrame (castor::Milliseconds tslf) override |
Renders one frame, only if not in render loop. | |
C3D_API void | pause () override |
Pauses the render loop. | |
C3D_API void | resume () override |
Resumes the render loop. | |
C3D_API void | endRendering () override |
Ends the render, cleans upĀ engine. | |
Public Member Functions inherited from castor3d::RenderLoop | |
C3D_API | RenderLoop (Engine &engine, uint32_t wantedFPS) |
Constructor. | |
virtual C3D_API | ~RenderLoop () noexcept |
Destructor. | |
C3D_API void | cleanup () |
Cleans up the render loop. | |
C3D_API void | showDebugOverlays (bool show) |
Show or hide debug overlays. | |
virtual C3D_API void | enableVSync (bool enable) |
Updates the V-Sync status. | |
C3D_API void | flushEvents () const |
Flushs all events of all frame listeners. | |
C3D_API void | registerTimer (castor::String const &category, FramePassTimer &timer) |
Registers a render pass timer. | |
C3D_API void | unregisterTimer (castor::String const &category, FramePassTimer &timer) |
Unregisters a render pass timer. | |
C3D_API void | registerBuffer (ShaderBuffer const &buffer) |
Registers a ShaderBuffer. | |
C3D_API void | unregisterBuffer (ShaderBuffer const &buffer) |
Unregisters a ShaderBuffer. | |
C3D_API bool | hasDebugOverlays () const |
C3D_API void | dumpFrameTimes (Parameters ¶ms) const |
The average frame time, in nanoseconds. | |
C3D_API castor::Nanoseconds | getAvgFrameTime () const |
castor::Milliseconds | getFrameTime () const noexcept |
uint32_t | getWantedFps () const noexcept |
castor::Microseconds | getLastFrameTime () const noexcept |
UploadData & | getUploadData () const noexcept |
Public Member Functions inherited from castor::OwnedBy< Engine > | |
Engine * | getOwner () const |
Additional Inherited Members | |
Static Public Attributes inherited from castor3d::RenderLoop | |
static constexpr uint32_t | UnlimitedFPS = 0xFFFFFFFFu |
Protected Member Functions inherited from castor3d::RenderLoop | |
C3D_API void | doRenderFrame (castor::Milliseconds tslf=0_ms) |
Starts threaded render loop. | |
Protected Member Functions inherited from castor::OwnedBy< Engine > | |
OwnedBy (Engine &owner) | |
Constructor. | |
Protected Attributes inherited from castor3d::RenderLoop | |
RenderSystem & | m_renderSystem |
uint32_t | m_wantedFPS |
castor::Milliseconds | m_frameTime |
std::atomic< castor::Microseconds > | m_lastFrameTime |
castor::RawUniquePtr< DebugOverlays > | m_debugOverlays |
castor::Mutex | m_debugOverlaysMtx |
Constructor.
[in] | engine | The engine. |
[in] | wantedFPS | The wanted FPS count. |
|
overridenoexcept |
Destructor.
|
overridevirtual |
Starts threaded render loop.
Implements castor3d::RenderLoop.
|
overridevirtual |
Ends the render, cleans upĀ engine.
Implements castor3d::RenderLoop.
|
overridevirtual |
Pauses the render loop.
Implements castor3d::RenderLoop.
|
overridevirtual |
Renders one frame, only if not in render loop.
[in] | tslf | The time elapsed since last frame. |
Implements castor3d::RenderLoop.
|
overridevirtual |
Resumes the render loop.
Implements castor3d::RenderLoop.