C Specification

The xrEnumerateViewConfigurations function is defined as:

// Provided by XR_VERSION_1_0
XrResult xrEnumerateViewConfigurations(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    uint32_t                                    viewConfigurationTypeCapacityInput,
    uint32_t*                                   viewConfigurationTypeCountOutput,
    XrViewConfigurationType*                    viewConfigurationTypes);


Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose view configurations will be enumerated.

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

  • viewConfigurationsTypeCountOutput is a pointer to the count of viewConfigurations written, or a pointer to the required capacity in the case that viewConfigurationsTypeCapacityInput is insufficient.

  • viewConfigurationsTypes is a pointer to an array of XrViewConfigurationType values, but can be NULL if viewConfigurationsTypeCapacityInput is 0.

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


xrEnumerateViewConfigurations enumerates the view configuration types supported by the XrSystemId. The supported set for that system must not change during the lifetime of its XrInstance. The returned list of primary view configurations should be in order from what the runtime considered highest to lowest user preference. Thus the first enumerated view configuration type should be the one the runtime prefers the application to use if possible.

Runtimes must always return identical buffer contents from this enumeration for the given systemId and for the lifetime of the instance.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • viewConfigurationTypeCountOutput must be a pointer to a uint32_t value

  • If viewConfigurationTypeCapacityInput is not 0, viewConfigurationTypes must be a pointer to an array of viewConfigurationTypeCapacityInput XrViewConfigurationType values

Return Codes
On success, this command returns

On failure, this command returns






See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2022 The Khronos Group Inc.