Getting started with command buffers
As the name suggests, a command buffer is a buffer or collection of commands in a single unit. A command buffer records various Vulkan API commands that an application is expected to execute. Command buffers once baked can be reused again and again. They record the commands in the sequence that is specified by the application. These commands are meant for carrying out different type jobs; this includes binding vertex buffer, pipeline binding, recording Render Pass commands, setting viewport and scissor, specifying drawing commands, controlling copy operations on image and buffer contents, and more.
There are two types of command buffers: primary and secondary command buffers:
- Primary command buffers: These are the owners of the secondary command buffers and responsible for executing them; they are directly submitted to the queues
- Secondary command buffers: These are executed through primary command buffers and cannot be directly submitted to...