Preparing a single frame of animation can be divided into five steps:
- Acquiring a swapchain image.
- Creating a framebuffer.
- Recording a command buffer.
- Submitting the command buffer to the queue.
- Presenting an image.
First, we must acquire a swapchain image into which we can render. Rendering is performed inside a render pass that defines the parameters of attachments. Specific resources used for these attachments are defined in a framebuffer.
As we want to render into a swapchain image (to display the image on screen), this image must be specified as one of the attachments defined in a framebuffer. It may seem that creating a framebuffer earlier and reusing it during the rendering is a good idea. Of course, it is a valid ...