Skip to main content

Commands

Command Pool

uint32_t index = logicalDevice->queueIndex(vtk::QueueType::Graphics);

// ...

vtk::Ref<vtk::CommandPool> commandPool = vtk::CommandPoolBuilder(logicalDevice)
.index(index)
.builder();

Command Buffer

VkCommandBuffer buffer = commandPool->create();
std::vector<VkCommandBuffer> buffers = commandPool->create(3);
caution

VkCommandBuffers do not need to be manually destroyed; however, they only exist for as long as the corresponding VkCommandPool, i.e. the origin vtk::CommandPool object. VkCommandBuffers are raw Vulkan handles, so they do not store a reference to the VkCommandPool on their own.