C Specification
The xrCreateEnvironmentDepthSwapchainMETA function is defined as:
// Provided by XR_META_environment_depth
XrResult xrCreateEnvironmentDepthSwapchainMETA(
    XrEnvironmentDepthProviderMETA              environmentDepthProvider,
    const XrEnvironmentDepthSwapchainCreateInfoMETA* createInfo,
    XrEnvironmentDepthSwapchainMETA*            swapchain);Parameters
Description
The xrCreateEnvironmentDepthSwapchainMETA function creates a readable swapchain, which is used for accessing the depth data.
The runtime decides on the resolution and length of the swapchain. Additional information about the swapchain can be accessed by calling xrGetEnvironmentDepthSwapchainStateMETA.
Runtimes must create a swapchain with array textures of length 2, which map
to a left-eye and right-eye view.
View index 0 must represent the left eye and view index 1 must represent
the right eye.
This is the same convention as for
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO in
XrViewConfigurationType.
Runtimes must create the swapchain with the following image formats
depending on the graphics API associated with the session:
- 
OpenGL: GL_DEPTH_COMPONENT16
- 
Vulkan: VK_FORMAT_D16_UNORM
- 
Direct3D: DXGI_FORMAT_D16_UNORM
Runtimes must only allow maximum one swapchain to exist per depth provider
at any given time, and must return XR_ERROR_LIMIT_REACHED if
xrCreateEnvironmentDepthSwapchainMETA is called to create more.
Applications should destroy the swapchain when no longer needed.
Applications must be able to handle different swapchain lengths and
resolutions.
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
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.