C Specification
To acquire an available presentable image to use, and retrieve the index of that image, call:
// Provided by VK_KHR_swapchain with VK_VERSION_1_1, VK_KHR_device_group with VK_KHR_swapchain
VkResult vkAcquireNextImage2KHR(
VkDevice device,
const VkAcquireNextImageInfoKHR* pAcquireInfo,
uint32_t* pImageIndex);
Parameters
-
deviceis the device associated withswapchain. -
pAcquireInfois a pointer to a VkAcquireNextImageInfoKHR structure containing parameters of the acquire. -
pImageIndexis a pointer to auint32_tthat is set to the index of the next image to use.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.