18 commandBuffer._commandBuffer = VK_NULL_HANDLE;
19 commandBuffer._commandPool =
nullptr;
28 commandBuffer._commandBuffer = VK_NULL_HANDLE;
29 commandBuffer._commandPool =
nullptr;
39 VkCommandBufferBeginInfo beginInfo{
40 beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
41 beginInfo.pNext =
nullptr,
42 beginInfo.flags = flags,
43 beginInfo.pInheritanceInfo =
nullptr 46 VkResult result = vkBeginCommandBuffer(
_commandBuffer, &beginInfo);
48 if (result != VK_SUCCESS) {
49 LUG_LOG.error(
"CommandBuffer: Can't begin the command buffer: {}", result);
59 if (result != VK_SUCCESS) {
60 LUG_LOG.error(
"CommandBuffer: Can't end the command buffer: {}", result);
68 VkResult result = vkResetCommandBuffer(
_commandBuffer, releaseRessources ? VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT : 0);
70 if (result != VK_SUCCESS) {
71 LUG_LOG.error(
"CommandBuffer: Can't reset the command buffer: {}", result);
bool reset(bool releaseRessources=false) const
const Device * getDevice() const
VkCommandPool _commandPool
CommandBuffer & operator=(const CommandBuffer &)=delete
const CommandPool * _commandPool
VkCommandBuffer _commandBuffer
bool begin(VkCommandBufferUsageFlags flags=VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT) const