3#include <vulkan/vulkan.hpp>
25 bool initialize(vk::Device device, uint32_t graphics_queue_family);
38 vk::CommandBufferLevel level = vk::CommandBufferLevel::ePrimary);
void reset_pool()
Reset command pool (invalidates all allocated buffers)
uint32_t m_graphics_queue_family
void end_single_time_commands(vk::CommandBuffer command_buffer, vk::Queue queue)
End and submit single-time command.
void free_command_buffer(vk::CommandBuffer command_buffer)
Free a command buffer back to the pool.
vk::CommandBuffer begin_single_time_commands()
Begin single-time command (for transfers, etc.)
std::vector< vk::CommandBuffer > m_allocated_buffers
VKCommandManager()=default
void cleanup()
Cleanup all command pools and buffers.
vk::CommandBuffer allocate_command_buffer(vk::CommandBufferLevel level=vk::CommandBufferLevel::ePrimary)
Allocate a command buffer with specified level.
vk::CommandPool get_pool() const
Get the command pool.
vk::CommandPool m_command_pool
Manages Vulkan command pools and command buffers.