When we want to perform operations using hardware, we need to record them and submit them to a queue. Commands are recorded into command buffers. So when we want to record them, we need to begin a recording operation of a selected command buffer, effectively setting it in the recording state.
Beginning a command buffer recording operation
How to do it...
- Take the handle of a command buffer, in which commands should be recorded, and store it in a variable of type VkCommandBuffer named command_buffer. Make sure the command buffer is allocated from a pool with a VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, or that it is in the initial state (it was reset).
- Create a variable of a bit field type VkCommandBufferUsageFlags named usage and set the following...