![]() |
Raven Engine v0.1
|
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< VulkanCommandBuffer > | AllocateCommandBuffer () |
| 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. | |
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.
| 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.
| queueFamilyIndex | Index of the queue family to associate with this pool. |
| Ref< VulkanCommandBuffer > Raven::VulkanCommandPool::AllocateCommandBuffer | ( | ) |
Allocates a single primary command buffer from this pool.
| 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.
|
inline |
Retrieves the raw Vulkan command pool handle.
| 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.