Usually, images created for a swapchain should fit into an application's window. The supported dimensions are available in the presentation surface's capabilities. But on some operating systems, the size of the images defines the final size of the window. We also should keep that in mind and check what dimensions are proper for the swapchain images.
Choosing a size of swapchain images
How to do it...
- Acquire the capabilities of a presentation surface (refer to the Getting capabilities of a presentation surface recipe). Store them in a variable of type VkSurfaceCapabilitiesKHR named surface_capabilities.
- Create a variable of type VkExtent2D named size_of_images in which we will store the desired size of swapchain images.
- Check whether the currentExtent...