Implementing a drawing object in Vulkan is simple; it consists of two phases: preparation, or building the drawing object, and rendering it. The former phase produces the command buffer and records the drawing commands. In the latter phase, the command buffer executes these drawing commands to render the object. Let's take a look at these phases in detail:
Preparing the drawing object: This phase produces the command buffers required to draw objects:
Command buffer creation: For each swapchain color image, create a corresponding command buffer object. For example, if the swapchain is a double buffer, then it will contain two color images. As a result, we should be creating two command buffers that correspond to each image.
Command buffer recording: For the command buffer created, record the Render Pass instance commands single subpass at ; refer to the following steps:
Associate the created Render Pass object and framebuffer with the required dimensions...