Rendering the drawing object
Once the Render Pass instance is prepared and recorded successfully in the drawing object's command buffer, we can reuse it each time to draw the object.
Drawing an object comprises three steps. First, we will need to acquire the index to the next available swapchain image onto which the primitive will be drawn or rasterized. Second, we will need to submit the command buffer to the graphics queue to execute the recorded command on the GPU; the GPU executes these commands and paints the available swapchain drawing images with the draw commands. Finally, the drawn image is handed over to the presentation engine, whichrenders the output onto the attached display window. The following subsections will describe each of these three steps in detail.
Acquiring the swapchain image
Before executing the Render Pass instance-recorded commands, we will need to acquire a swapchain image onto which the drawings will be performed. For this, we will need to query the index of the...