Finality Engine
Loading...
Searching...
No Matches
FINALITY::RenderDevice Class Referenceabstract

Defines the graphics backend boundary and render submission contract. More...

#include <RenderDevice.h>

Inheritance diagram for FINALITY::RenderDevice:
FINALITY::VKRenderDevice

Public Member Functions

virtual ~RenderDevice ()=default
virtual void Initialize (const NativeWindowHandle &handle)=0
virtual void Shutdown ()=0
virtual void BeginFrame ()=0
virtual void EndFrame ()=0
virtual void PresentFrame ()=0
virtual void WaitIdle ()=0
 Waits for outstanding device work to finish.
virtual void RetireResource (std::function< void()> release)=0
 Defers resource cleanup until backend frame work permits its release.
virtual void FlushRetiredResources ()=0
virtual void Clear (float r, float g, float b, float a)=0
virtual void SetWindowSpec (const WindowSpec &spec)=0
virtual WindowSpec GetWindowSpec ()=0
virtual void DrawQueue (const std::vector< RenderPacket > &queue)=0
virtual RendererAPI GetActiveApi () const =0
virtual std::shared_ptr< Mesh > CreateMesh (const std::vector< Vertex > &vertices)=0
virtual std::shared_ptr< Mesh > CreateMesh (const std::vector< Vertex > &vertices, const std::vector< uint32_t > &indices)=0
virtual std::shared_ptr< Mesh > CreateMesh (const std::string &meshPath)=0
virtual std::shared_ptr< Pipeline > CreatePipeline (const PipelineConfig &config)=0
virtual std::unique_ptr< Shader > CreateShader (const std::string &path)=0
virtual std::shared_ptr< Pipeline > CreatePostProcessPipeline (const PipelineConfig &config)=0
virtual void SetPostProcessPipeline (std::shared_ptr< Pipeline > pipeline)=0
virtual void SetFrameView (const RenderView &view)=0
virtual std::shared_ptr< RenderTarget > CreateRenderTarget (uint32_t width, uint32_t height)=0
virtual void ResizeRenderTarget (const std::shared_ptr< RenderTarget > &target, uint32_t width, uint32_t height)=0
void UpdateRenderTargetCamera (const std::shared_ptr< RenderTarget > &target, Camera *camera)
virtual void SetRenderTargetView (const std::shared_ptr< RenderTarget > &target, const RenderView &view)=0
virtual void DestroyRenderTargetGpuResources (RenderTarget &target)=0
virtual void RenderSceneToTarget (const std::shared_ptr< RenderTarget > &target, const std::vector< RenderPacket > &queue)=0
virtual void * GetRenderTargetTextureHandle (const std::shared_ptr< RenderTarget > &target)=0
virtual void SetRenderTargetClearColor (const std::shared_ptr< RenderTarget > &target, float r, float g, float b, float a)=0
virtual void SetGameRenderTarget (const std::shared_ptr< RenderTarget > &target)=0
virtual void SetSwapchainClearColor (float r, float g, float b, float a)=0
virtual void BeginTextureBatch ()=0
virtual void EndAndSubmitTextureBatch ()=0
virtual bool IsUploadBatchActive () const =0
virtual const double GetGPUTimeMS () const =0

Detailed Description

Defines the graphics backend boundary and render submission contract.

The device exposes frame operations, resource creation, drawing and deferred resource retirement. RenderPacket carries geometry, pipeline, transform, material, texture and visibility inputs without exposing Vulkan command types to scene code.

Usage
Keep backend-specific synchronization inside the implementation. Retire resources after submitted work completes; WaitIdle is an explicit synchronization operation, not routine per-object cleanup.

Definition at line 67 of file RenderDevice.h.

Constructor & Destructor Documentation

◆ ~RenderDevice()

virtual FINALITY::RenderDevice::~RenderDevice ( )
virtualdefault

Member Function Documentation

◆ Initialize()

virtual void FINALITY::RenderDevice::Initialize ( const NativeWindowHandle & handle)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ Shutdown()

virtual void FINALITY::RenderDevice::Shutdown ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ BeginFrame()

virtual void FINALITY::RenderDevice::BeginFrame ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ EndFrame()

virtual void FINALITY::RenderDevice::EndFrame ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ PresentFrame()

virtual void FINALITY::RenderDevice::PresentFrame ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ WaitIdle()

virtual void FINALITY::RenderDevice::WaitIdle ( )
pure virtual

Waits for outstanding device work to finish.

This is an explicit synchronization boundary. Routine object cleanup should use deferred retirement to avoid stalling the entire device.

Implemented in FINALITY::VKRenderDevice.

◆ RetireResource()

virtual void FINALITY::RenderDevice::RetireResource ( std::function< void()> release)
pure virtual

Defers resource cleanup until backend frame work permits its release.

Parameters
releaseCleanup operation retaining the resources it needs to release. Use retirement when replacing resources that recorded or submitted work may still reference. The backend controls completion and draining of cleanup operations.

Implemented in FINALITY::VKRenderDevice.

◆ FlushRetiredResources()

virtual void FINALITY::RenderDevice::FlushRetiredResources ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ Clear()

virtual void FINALITY::RenderDevice::Clear ( float r,
float g,
float b,
float a )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetWindowSpec()

virtual void FINALITY::RenderDevice::SetWindowSpec ( const WindowSpec & spec)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ GetWindowSpec()

virtual WindowSpec FINALITY::RenderDevice::GetWindowSpec ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ DrawQueue()

virtual void FINALITY::RenderDevice::DrawQueue ( const std::vector< RenderPacket > & queue)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ GetActiveApi()

virtual RendererAPI FINALITY::RenderDevice::GetActiveApi ( ) const
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreateMesh() [1/3]

virtual std::shared_ptr< Mesh > FINALITY::RenderDevice::CreateMesh ( const std::vector< Vertex > & vertices)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreateMesh() [2/3]

virtual std::shared_ptr< Mesh > FINALITY::RenderDevice::CreateMesh ( const std::vector< Vertex > & vertices,
const std::vector< uint32_t > & indices )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreateMesh() [3/3]

virtual std::shared_ptr< Mesh > FINALITY::RenderDevice::CreateMesh ( const std::string & meshPath)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreatePipeline()

virtual std::shared_ptr< Pipeline > FINALITY::RenderDevice::CreatePipeline ( const PipelineConfig & config)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreateShader()

virtual std::unique_ptr< Shader > FINALITY::RenderDevice::CreateShader ( const std::string & path)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreatePostProcessPipeline()

virtual std::shared_ptr< Pipeline > FINALITY::RenderDevice::CreatePostProcessPipeline ( const PipelineConfig & config)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetPostProcessPipeline()

virtual void FINALITY::RenderDevice::SetPostProcessPipeline ( std::shared_ptr< Pipeline > pipeline)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetFrameView()

virtual void FINALITY::RenderDevice::SetFrameView ( const RenderView & view)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ CreateRenderTarget()

virtual std::shared_ptr< RenderTarget > FINALITY::RenderDevice::CreateRenderTarget ( uint32_t width,
uint32_t height )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ ResizeRenderTarget()

virtual void FINALITY::RenderDevice::ResizeRenderTarget ( const std::shared_ptr< RenderTarget > & target,
uint32_t width,
uint32_t height )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ UpdateRenderTargetCamera()

void FINALITY::RenderDevice::UpdateRenderTargetCamera ( const std::shared_ptr< RenderTarget > & target,
Camera * camera )
inline

Definition at line 112 of file RenderDevice.h.

◆ SetRenderTargetView()

virtual void FINALITY::RenderDevice::SetRenderTargetView ( const std::shared_ptr< RenderTarget > & target,
const RenderView & view )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ DestroyRenderTargetGpuResources()

virtual void FINALITY::RenderDevice::DestroyRenderTargetGpuResources ( RenderTarget & target)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ RenderSceneToTarget()

virtual void FINALITY::RenderDevice::RenderSceneToTarget ( const std::shared_ptr< RenderTarget > & target,
const std::vector< RenderPacket > & queue )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ GetRenderTargetTextureHandle()

virtual void * FINALITY::RenderDevice::GetRenderTargetTextureHandle ( const std::shared_ptr< RenderTarget > & target)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetRenderTargetClearColor()

virtual void FINALITY::RenderDevice::SetRenderTargetClearColor ( const std::shared_ptr< RenderTarget > & target,
float r,
float g,
float b,
float a )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetGameRenderTarget()

virtual void FINALITY::RenderDevice::SetGameRenderTarget ( const std::shared_ptr< RenderTarget > & target)
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ SetSwapchainClearColor()

virtual void FINALITY::RenderDevice::SetSwapchainClearColor ( float r,
float g,
float b,
float a )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ BeginTextureBatch()

virtual void FINALITY::RenderDevice::BeginTextureBatch ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ EndAndSubmitTextureBatch()

virtual void FINALITY::RenderDevice::EndAndSubmitTextureBatch ( )
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ IsUploadBatchActive()

virtual bool FINALITY::RenderDevice::IsUploadBatchActive ( ) const
pure virtual

Implemented in FINALITY::VKRenderDevice.

◆ GetGPUTimeMS()

virtual const double FINALITY::RenderDevice::GetGPUTimeMS ( ) const
pure virtual

Implemented in FINALITY::VKRenderDevice.


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