VPP  0.8
A high-level modern C++ API for Vulkan
vpp::CommandPool Class Reference

Allocates and manages the lifetime of command buffers. More...

#include <vppCommandPool.hpp>

Public Types

enum  EBufferLevel { PRIMARY = VK_COMMAND_BUFFER_LEVEL_PRIMARY, SECONDARY = VK_COMMAND_BUFFER_LEVEL_SECONDARY }
 

Public Member Functions

 CommandPool (const Device &hDevice, EQueueType queueType, std::uint32_t flags=0)
 Creates a command pool for specified device and queue type.
 
VkResult reset ()
 Resets all child buffers for reusing. More...
 
VkResult release ()
 Freees all child buffers. More...
 
bool valid () const
 Checks whether this is valid command pool.
 
const Devicedevice () const
 Retrieves the device.
 
VkCommandPool handle () const
 Retrieves the Vulkan handle.
 
CommandBuffer createBuffer (EBufferLevel level=PRIMARY)
 Creates single command buffer.
 
void freeBuffer (const CommandBuffer &buffer)
 Frees single command buffer.
 
VkResult createBuffers (std::uint32_t count, std::vector< CommandBuffer > *pBuffers, EBufferLevel level=PRIMARY)
 Creates multiple command buffers.
 
void freeBuffers (const std::vector< CommandBuffer > &buffers)
 Frees multiple command buffers.
 

Detailed Description

Allocates and manages the lifetime of command buffers.

Member Function Documentation

◆ release()

VkResult vpp::CommandPool::release ( )

Freees all child buffers.

These buffers will be destroyed.

◆ reset()

VkResult vpp::CommandPool::reset ( )

Resets all child buffers for reusing.

These buffers will be ready for recording again.


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