Swapchain
A swapchain in Vulkan mimics the functionality of double and triple buffering from OpenGL but with a more explicit role for the application in managing swapchain buffers. This approach provides better control over the configuration, synchronization, and presentation of images.
A Vulkan swapchain is a collection of images associated with a surface (VkSurfaceKHR
) that are used to display rendering outputs in a window. Even though it is a key part of the Vulkan API, the functions and types used to create and manage a swapchain are part of the VK_KHR_swapchain
extension.
The number of images in a swapchain object must be determined during its construction but must fall between the minimum (minImageCount
) and maximum (maxImageCount
) possible values provided by the device. Those values can be retrieved from the VkSurfaceCapabilitiesKHR
structure of the Vulkan physical device.
Swapchain images (VkImage
) are created and owned by the swapchain object and, as a result, their...