Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
rendering_engine::IRenderResources Class Referenceabstract

Interface for rendering backend resource aggregation and submission. More...

#include <i_render_resources.hpp>

Inherited by rendering_engine::VulkanRenderResources.

Public Member Functions

virtual ~IRenderResources ()=default
 Virtual destructor.
virtual void Initialize (Material *material, MeshDataGpu *meshData, TextureCache *textureCache)=0
 Initializes GPU-side resources using provided material, mesh, and texture cache.
virtual void SubmitResources (Transformations2D &transformations, const PackedMaterialData &materialParameters)=0
 Updates GPU resources and issues a draw call for a 2D object.
virtual void SubmitResources (Transformations3D &transformations, const PackedMaterialData &materialParameters)=0
 Updates GPU resources and issues a draw call for a 3D object.
virtual void Shutdown ()=0
 Releases all allocated GPU resources for this object.

Detailed Description

Interface for rendering backend resource aggregation and submission.

Implementations of this interface aggregate all GPU-side objects and logic required to render a drawable entity. The interface is backend-agnostic and can be implemented for any graphics API.

The interface is designed to work with shared resource caches (material, mesh, texture), typically owned elsewhere and passed to Initialize().

Note
Lifetime management of Material, MeshDataGpu, and TextureCache must be handled externally.

Definition at line 30 of file i_render_resources.hpp.

Constructor & Destructor Documentation

◆ ~IRenderResources()

virtual rendering_engine::IRenderResources::~IRenderResources ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ Initialize()

virtual void rendering_engine::IRenderResources::Initialize ( Material * material,
MeshDataGpu * meshData,
TextureCache * textureCache )
pure virtual

Initializes GPU-side resources using provided material, mesh, and texture cache.

Parameters
materialPointer to the Material describing the shader and its parameters.
meshDataPointer to MeshDataGpu containing vertex and index buffers.
textureCachePointer to the TextureCache containing all loaded textures.
Note
Ownership of parameters is not transferred; caller must ensure they remain valid.

Implemented in rendering_engine::VulkanRenderResources.

◆ Shutdown()

virtual void rendering_engine::IRenderResources::Shutdown ( )
pure virtual

Releases all allocated GPU resources for this object.

Implemented in rendering_engine::VulkanRenderResources.

◆ SubmitResources() [1/2]

virtual void rendering_engine::IRenderResources::SubmitResources ( Transformations2D & transformations,
const PackedMaterialData & materialParameters )
pure virtual

Updates GPU resources and issues a draw call for a 2D object.

Parameters
transformationsTransformation data (2D).
materialParametersPacked structure with material parameters for the draw call.

Implemented in rendering_engine::VulkanRenderResources.

◆ SubmitResources() [2/2]

virtual void rendering_engine::IRenderResources::SubmitResources ( Transformations3D & transformations,
const PackedMaterialData & materialParameters )
pure virtual

Updates GPU resources and issues a draw call for a 3D object.

Parameters
transformationsTransformation data (3D).
materialParametersPacked structure with material parameters for the draw call.

Implemented in rendering_engine::VulkanRenderResources.


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