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

#include <RenderLoopSync.hpp>

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

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 &params) 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
 
UploadDatagetUploadData () 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
RenderSystemm_renderSystem
 
uint32_t m_wantedFPS
 
castor::Milliseconds m_frameTime
 
std::atomic< castor::Microsecondsm_lastFrameTime
 
castor::RawUniquePtr< DebugOverlaysm_debugOverlays
 
castor::Mutex m_debugOverlaysMtx
 

Constructor & Destructor Documentation

◆ RenderLoopSync()

C3D_API castor3d::RenderLoopSync::RenderLoopSync ( Engine & engine,
uint32_t wantedFPS )

Constructor.

Parameters
[in]engineThe engine.
[in]wantedFPSThe wanted FPS count.

◆ ~RenderLoopSync()

C3D_API castor3d::RenderLoopSync::~RenderLoopSync ( )
overridenoexcept

Destructor.

Member Function Documentation

◆ beginRendering()

C3D_API void castor3d::RenderLoopSync::beginRendering ( )
overridevirtual

Starts threaded render loop.

Implements castor3d::RenderLoop.

◆ endRendering()

C3D_API void castor3d::RenderLoopSync::endRendering ( )
overridevirtual

Ends the render, cleans upĀ engine.

Remarks
Ends the threaded render loop, if any.

Implements castor3d::RenderLoop.

◆ pause()

C3D_API void castor3d::RenderLoopSync::pause ( )
overridevirtual

Pauses the render loop.

Implements castor3d::RenderLoop.

◆ renderSyncFrame()

C3D_API void castor3d::RenderLoopSync::renderSyncFrame ( castor::Milliseconds tslf)
overridevirtual

Renders one frame, only if not in render loop.

Parameters
[in]tslfThe time elapsed since last frame.

Implements castor3d::RenderLoop.

◆ resume()

C3D_API void castor3d::RenderLoopSync::resume ( )
overridevirtual

Resumes the render loop.

Implements castor3d::RenderLoop.


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