C Specification

The xrEnumerateSwapchainImages function is defined as:

XrResult xrEnumerateSwapchainImages(
    XrSwapchain                                 swapchain,
    uint32_t                                    imageCapacityInput,
    uint32_t*                                   imageCountOutput,
    XrSwapchainImageBaseHeader*                 images);

Parameters

Parameter Descriptions
  • swapchain is the XrSwapchain to get images from.

  • imageCapacityInput is the capacity of the images array, or 0 to indicate a request to retrieve the required capacity.

  • imageCountOutput is a pointer to the count of images written, or a pointer to the required capacity in the case that imageCapacityInput is 0.

  • images is a pointer to an array of graphics API-specific XrSwapchainImage structures based off of XrSwapchainImageBaseHeader. It can be NULL if imageCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required images size.

Description

Fills an array of graphics API-specific XrSwapchainImage structures. The resources must be constant and valid for the lifetime of the XrSwapchain.

Note: images is a pointer to an array of structures of graphics API-specific type, not an array of structure pointers.

Valid Usage (Implicit)
  • swapchain must be a valid XrSwapchain handle

  • If imageCapacityInput is not 0, imageCapacityInput must be a valid uint32_t value

  • If imageCountOutput is not NULL, imageCountOutput must be a pointer to a uint32_t value

  • If imageCapacityInput is not 0, images must be a pointer to an array of imageCapacityInput XrSwapchainImageBaseHeader structures

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

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 (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.