After we are done rendering into a swapchain image or using it for any other purposes, we need to give the image back to the presentation engine. This operation is called a presentation and it displays an image on screen.
Presenting an image
Getting ready
In this recipe, we will be using a custom structure defined as follows:
struct PresentInfo { VkSwapchainKHR Swapchain; uint32_t ImageIndex; };
It is used to define a swapchain from which we want to present an image, and an image (its index) that we want to display. For each swapchain, we can present only one image at a time.
How to do it...
- Prepare...