C Specification
To acquire an available presentable image to use, and retrieve the index of that image, call:
VkResult vkAcquireNextImageKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
VkFence fence,
uint32_t* pImageIndex);
Parameters
-
deviceis the device associated withswapchain. -
swapchainis the non-retired swapchain from which an image is being acquired. -
timeoutspecifies how long the function waits, in nanoseconds, if no image is available. -
semaphoreis VK_NULL_HANDLE or a semaphore to signal. -
fenceis VK_NULL_HANDLE or a fence to signal. -
pImageIndexis a pointer to auint32_tin which the index of the next image to use (i.e. an index into the array of images returned byvkGetSwapchainImagesKHR) is returned.
Description
See Also
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.
Copyright
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.