C Specification

When submitting depth buffers along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.

The XrCompositionLayerDepthInfoKHR structure is defined as:

typedef struct XrCompositionLayerDepthInfoKHR {
    XrStructureType             type;
    const void* XR_MAY_ALIAS    next;
    XrSwapchainSubImage         subImage;
    float                       minDepth;
    float                       maxDepth;
    float                       nearZ;
    float                       farZ;
} XrCompositionLayerDepthInfoKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • subImage identifies the depth image XrSwapchainSubImage to be associated with the color swapchain. The contained imageRect specifies the valid portion of the depth image to use, in pixels. The contained imageArrayIndex is the depth image array index, with 0 meaning the first or only array element.

  • minDepth and maxDepth are the range of depth values the depthSwapchain could have, in the range of [0.0,1.0]. This is akin to min and max values of OpenGL’s glDepthRange, but with the requirement here that maxDepth >= minDepth.

  • nearZ is the positive distance in meters of the minDepth value in the depth swapchain. Apps may use a nearZ that is greater than farZ to indicate depth values are reversed. nearZ can be infinite.

  • farZ is the positive distance in meters of the maxDepth value in the depth swapchain. farZ can be infinite. Apps must not use the same value as nearZ.

Description

XrCompositionLayerDepthInfoKHR contains the information needed to specify an extra layer with depth information. When submitting depth buffers along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.

Valid Usage (Implicit)

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.