C Specification
The xrWaitSwapchainImage function is defined as:
XrResult xrWaitSwapchainImage(
XrSwapchain swapchain,
const XrSwapchainImageWaitInfo* waitInfo);
Parameters
Description
Before an application can begin writing to a swapchain image, it must first wait on the image to avoid writing to it before the compositor has finished reading from it. xrWaitSwapchainImage will implicitly wait on the oldest acquired swapchain image which has not yet been successfully waited on. Once a swapchain image has been successfully waited on, it must be released before waiting on the next acquired swapchain image.
This function may block for longer than the timeout specified in XrSwapchainImageWaitInfo due to scheduling or contention.
If the timeout expires without the image becoming available for writing,
XR_TIMEOUT_EXPIRED
is returned.
If xrWaitSwapchainImage returns XR_TIMEOUT_EXPIRED
, the next call
to xrWaitSwapchainImage will wait on the same image index again until the
function succeeds with XR_SUCCESS
.
Note that this is not an error code; XR_SUCCEEDED(
is XR_TIMEOUT_EXPIRED
)true
.
The runtime must return XR_ERROR_CALL_ORDER_INVALID
if no image has
been acquired by calling xrAcquireSwapchainImage.
See Also
Document Notes
For more information, see the OpenXR Specification at URL
This page is extracted from the OpenXR 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.