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

Wrapper around a Vulkan command pool. More...

#include <VulkanCommandPool.h>

Public Member Functions

 VulkanCommandPool (u32 queueFamilyIndex)
 Creates a Vulkan command pool for the given queue family index.
void Destroy ()
 Destroys the Vulkan command pool and frees all associated resources.
Ref< VulkanCommandBufferAllocateCommandBuffer ()
 Allocates a single primary command buffer from this pool.
void Reset ()
 Resets the command pool, freeing all command buffers allocated from it.
VkCommandPool GetHandle () const
 Retrieves the raw Vulkan command pool handle.

Detailed Description

Wrapper around a Vulkan command pool.

Manages the lifecycle of a VkCommandPool object for a specific queue family. Allows allocation and resetting of command buffers tied to the pool.

Constructor & Destructor Documentation

◆ VulkanCommandPool()

Raven::VulkanCommandPool::VulkanCommandPool ( u32 queueFamilyIndex)

Creates a Vulkan command pool for the given queue family index.

The pool is created with the flag to allow individual command buffer resets.

Parameters
queueFamilyIndexIndex of the queue family to associate with this pool.

Member Function Documentation

◆ AllocateCommandBuffer()

Ref< VulkanCommandBuffer > Raven::VulkanCommandPool::AllocateCommandBuffer ( )

Allocates a single primary command buffer from this pool.

Returns
Ref<VulkanCommandBuffer> Smart pointer managing the allocated command buffer.

◆ Destroy()

void Raven::VulkanCommandPool::Destroy ( )

Destroys the Vulkan command pool and frees all associated resources.

Must be called before the device is destroyed to avoid leaks.

◆ GetHandle()

VkCommandPool Raven::VulkanCommandPool::GetHandle ( ) const
inline

Retrieves the raw Vulkan command pool handle.

Returns
VkCommandPool Vulkan command pool handle.

◆ Reset()

void Raven::VulkanCommandPool::Reset ( )

Resets the command pool, freeing all command buffers allocated from it.

After reset, command buffers must be re-recorded before use.


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