![]() |
Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
|
Vulkan implementation of the mesh GPU resource interface. More...
#include <vulkan_mesh_resources.hpp>
Inherits rendering_engine::IMeshRenderResources.
Public Member Functions | |
| VulkanMeshResources (VulkanRenderer *renderer) | |
| Construct Vulkan mesh resources. | |
| void | CreateVertexBuffer (std::vector< Vertex2D > vertices) override |
| Create a GPU vertex buffer from 2D vertex data. | |
| void | CreateVertexBuffer (std::vector< VertexPositionColorTexture > vertices) override |
| Create a GPU vertex buffer from 3D unlit vertex data. | |
| void | CreateVertexBuffer (std::vector< VertexPositionColorTextureNormalTangent > vertices) override |
| Create a GPU vertex buffer from 3D lit vertex data. | |
| void | CreateIndexBuffer (std::vector< uint32_t > indices) override |
| Create a GPU index buffer. | |
| bool | IsOnGPU () const override |
| Query whether buffers are currently resident on the GPU. | |
| void | Shutdown () override |
| Release all GPU resources associated with this mesh. | |
| VkBuffer | GetVertexBuffer () const |
| Get the Vulkan vertex buffer handle. | |
| VkBuffer | GetIndexBuffer () const |
| Get the Vulkan index buffer handle. | |
| size_t | GetVertexBufferSize () const override |
| Get the size (in bytes) of the GPU vertex buffer. | |
| size_t | GetIndexBufferSize () const override |
| Get the size (in bytes) of the GPU index buffer. | |
| Public Member Functions inherited from rendering_engine::IMeshRenderResources | |
| virtual | ~IMeshRenderResources ()=default |
| Virtual destructor. | |
Vulkan implementation of the mesh GPU resource interface.
Manages Vulkan buffers and device memory for mesh vertex and index data. Supports multiple vertex types and provides direct access to underlying VkBuffer handles.
Definition at line 22 of file vulkan_mesh_resources.hpp.
| rendering_engine::VulkanMeshResources::VulkanMeshResources | ( | VulkanRenderer * | renderer | ) |
Construct Vulkan mesh resources.
| renderer | Pointer to the owning VulkanRenderer. |
Definition at line 9 of file vulkan_mesh_resources.cpp.
|
overridevirtual |
Create a GPU index buffer.
| indices | Vector of indices. |
Implements rendering_engine::IMeshRenderResources.
Definition at line 96 of file vulkan_mesh_resources.cpp.
|
overridevirtual |
Create a GPU vertex buffer from 2D vertex data.
| vertices | Vector of 2D vertex data. |
Implements rendering_engine::IMeshRenderResources.
Definition at line 18 of file vulkan_mesh_resources.cpp.
|
overridevirtual |
Create a GPU vertex buffer from 3D unlit vertex data.
| vertices | Vector of VertexPositionColorTexture data. |
Implements rendering_engine::IMeshRenderResources.
Definition at line 44 of file vulkan_mesh_resources.cpp.
|
overridevirtual |
Create a GPU vertex buffer from 3D lit vertex data.
| vertices | Vector of VertexPositionColorTextureNormalTangent data. |
Implements rendering_engine::IMeshRenderResources.
Definition at line 70 of file vulkan_mesh_resources.cpp.
| VkBuffer rendering_engine::VulkanMeshResources::GetIndexBuffer | ( | ) | const |
Get the Vulkan index buffer handle.
Definition at line 143 of file vulkan_mesh_resources.cpp.
|
inlineoverridevirtual |
Get the size (in bytes) of the GPU index buffer.
Implements rendering_engine::IMeshRenderResources.
Definition at line 153 of file vulkan_mesh_resources.cpp.
| VkBuffer rendering_engine::VulkanMeshResources::GetVertexBuffer | ( | ) | const |
Get the Vulkan vertex buffer handle.
Definition at line 138 of file vulkan_mesh_resources.cpp.
|
inlineoverridevirtual |
Get the size (in bytes) of the GPU vertex buffer.
Implements rendering_engine::IMeshRenderResources.
Definition at line 148 of file vulkan_mesh_resources.cpp.
|
inlineoverridevirtual |
Query whether buffers are currently resident on the GPU.
Implements rendering_engine::IMeshRenderResources.
Definition at line 120 of file vulkan_mesh_resources.cpp.
|
overridevirtual |
Release all GPU resources associated with this mesh.
Implements rendering_engine::IMeshRenderResources.
Definition at line 125 of file vulkan_mesh_resources.cpp.