Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::VulkanIndexBuffer Class Reference

Vulkan implementation of an index buffer. More...

#include <VulkanIndexBuffer.h>

Inheritance diagram for Raven::VulkanIndexBuffer:
Raven::IndexBuffer

Public Member Functions

 VulkanIndexBuffer (void *data, u32 size)
 Constructs the Vulkan index buffer from raw index data.
 ~VulkanIndexBuffer ()
 Cleans up Vulkan resources associated with the index buffer.
u32 GetCount () const override
 Gets the count of indices stored.
u32 GetSize () const override
 Gets the size of the buffer in bytes.
VkBuffer GetVulkanBuffer () const
 Gets the raw Vulkan buffer handle.
Public Member Functions inherited from Raven::IndexBuffer
virtual ~IndexBuffer ()=default

Additional Inherited Members

Static Public Member Functions inherited from Raven::IndexBuffer
static Ref< IndexBufferCreate (void *data, u32 size)
 Factory method to create an index buffer with provided raw data.

Detailed Description

Vulkan implementation of an index buffer.

Manages a GPU index buffer backed by Vulkan, handling buffer creation, staging, and device-local memory allocation. Exposes Vulkan buffer handle for low-level access when necessary.

Constructor & Destructor Documentation

◆ VulkanIndexBuffer()

Raven::VulkanIndexBuffer::VulkanIndexBuffer ( void * data,
u32 size )

Constructs the Vulkan index buffer from raw index data.

Copies the input data into a staging buffer and then transfers it to a device-local Vulkan buffer optimized for GPU access.

Parameters
dataPointer to raw index data (typically u16).
sizeSize of the data in bytes.

◆ ~VulkanIndexBuffer()

Raven::VulkanIndexBuffer::~VulkanIndexBuffer ( )

Cleans up Vulkan resources associated with the index buffer.

Member Function Documentation

◆ GetCount()

u32 Raven::VulkanIndexBuffer::GetCount ( ) const
inlineoverridevirtual

Gets the count of indices stored.

Returns
Number of indices (u32).

Implements Raven::IndexBuffer.

◆ GetSize()

u32 Raven::VulkanIndexBuffer::GetSize ( ) const
inlineoverridevirtual

Gets the size of the buffer in bytes.

Returns
Size in bytes (u32).

Implements Raven::IndexBuffer.

◆ GetVulkanBuffer()

VkBuffer Raven::VulkanIndexBuffer::GetVulkanBuffer ( ) const
inline

Gets the raw Vulkan buffer handle.

Returns
VkBuffer handle to the GPU index buffer.

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