![]() |
Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
|
Vulkan implementation of IRenderResources for the Rendering Engine. More...
#include <vulkan_render_resources.hpp>
Inherits rendering_engine::IRenderResources, and rendering_engine::IRendererObserver.
Public Member Functions | |
| VulkanRenderResources (VulkanRenderer *renderer) | |
| Constructor. | |
| ~VulkanRenderResources () | |
| Destructor. | |
| void | Initialize (Material *material, MeshDataGpu *meshData, TextureCache *textureCache) override |
| Initializes GPU-side resources using provided material, mesh, and texture cache. | |
| void | SubmitResources (Transformations2D &transformations, const PackedMaterialData &materialParameters) override |
| Updates GPU resources and issues a draw call for a 2D object. | |
| void | SubmitResources (Transformations3D &transformations, const PackedMaterialData &materialParameters) override |
| Updates GPU resources and issues a draw call for a 3D object. | |
| void | Shutdown () override |
| Releases all allocated GPU resources for this object. | |
| Public Member Functions inherited from rendering_engine::IRenderResources | |
| virtual | ~IRenderResources ()=default |
| Virtual destructor. | |
| Public Member Functions inherited from rendering_engine::IRendererObserver | |
| virtual | ~IRendererObserver ()=default |
| Virtual destructor. | |
Protected Member Functions | |
| void | OnRenderResourcesRelease () override |
| Renderer callback: release all GPU resources (used during device loss/reset). | |
| void | OnRenderResourcesRebuild () override |
| Renderer callback: re-upload or recreate all GPU resources (used after device reset/rebuild). | |
| void | AcquireResources () |
| Allocates and initializes all GPU buffers, descriptor sets, and pipelines for this drawable. | |
| void | CreateUniformBuffers () |
| void | CreateDescriptorPool () |
| void | CreateDescriptorSet () |
| void | UpdateTransformations (Transformations2D &transformations) |
| void | UpdateTransformations (Transformations3D &transformations) |
| void | UpdateMaterialParameters (const PackedMaterialData &materialParameters) |
| void | DrawIndexed () |
| Issues a Vulkan draw command for the currently bound indexed mesh. | |
Vulkan implementation of IRenderResources for the Rendering Engine.
Aggregates and manages Vulkan GPU-side resources (buffers, descriptor sets, pipelines) required to render a drawable object. Responds to renderer events (release/rebuild) and can be safely reused with shared caches for materials, meshes, and textures.
Definition at line 28 of file vulkan_render_resources.hpp.
| rendering_engine::VulkanRenderResources::VulkanRenderResources | ( | VulkanRenderer * | renderer | ) |
Constructor.
| renderer | Pointer to the owning VulkanRenderer instance. |
Registers itself as an observer for resource (re)creation events.
Definition at line 16 of file vulkan_render_resources.cpp.
| rendering_engine::VulkanRenderResources::~VulkanRenderResources | ( | ) |
Destructor.
Unregisters from the renderer and calls Shutdown() to release all resources.
Definition at line 24 of file vulkan_render_resources.cpp.
|
protected |
Allocates and initializes all GPU buffers, descriptor sets, and pipelines for this drawable.
Definition at line 81 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 141 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 184 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 101 of file vulkan_render_resources.cpp.
|
protected |
Issues a Vulkan draw command for the currently bound indexed mesh.
Definition at line 330 of file vulkan_render_resources.cpp.
|
overridevirtual |
Initializes GPU-side resources using provided material, mesh, and texture cache.
| material | Pointer to the Material describing the shader and its parameters. |
| meshData | Pointer to MeshDataGpu containing vertex and index buffers. |
| textureCache | Pointer to the TextureCache containing all loaded textures. |
Implements rendering_engine::IRenderResources.
Definition at line 29 of file vulkan_render_resources.cpp.
|
overrideprotectedvirtual |
Renderer callback: re-upload or recreate all GPU resources (used after device reset/rebuild).
This method will be called after the device or swapchain is recreated, allowing the observer to re-upload or recreate all necessary resources for rendering.
Implements rendering_engine::IRendererObserver.
Definition at line 76 of file vulkan_render_resources.cpp.
|
overrideprotectedvirtual |
Renderer callback: release all GPU resources (used during device loss/reset).
This method will be called before any device or swapchain is destroyed, allowing the observer to safely release all handles and deallocate any GPU memory.
Implements rendering_engine::IRendererObserver.
Definition at line 71 of file vulkan_render_resources.cpp.
|
overridevirtual |
Releases all allocated GPU resources for this object.
Implements rendering_engine::IRenderResources.
Definition at line 52 of file vulkan_render_resources.cpp.
|
overridevirtual |
Updates GPU resources and issues a draw call for a 2D object.
| transformations | Transformation data (2D). |
| materialParameters | Packed structure with material parameters for the draw call. |
Implements rendering_engine::IRenderResources.
Definition at line 38 of file vulkan_render_resources.cpp.
|
overridevirtual |
Updates GPU resources and issues a draw call for a 3D object.
| transformations | Transformation data (3D). |
| materialParameters | Packed structure with material parameters for the draw call. |
Implements rendering_engine::IRenderResources.
Definition at line 45 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 315 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 289 of file vulkan_render_resources.cpp.
|
protected |
Definition at line 301 of file vulkan_render_resources.cpp.