Class XrCompositionLayerDepthInfoKHR

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrCompositionLayerDepthInfoKHR>
org.lwjgl.openxr.XrCompositionLayerDepthInfoKHR
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrCompositionLayerDepthInfoKHR extends org.lwjgl.system.Struct<XrCompositionLayerDepthInfoKHR> implements org.lwjgl.system.NativeResource
Depth map layer info.
Description
Note

The window space depth values minDepth and maxDepth are akin to the parameters of glDepthRange that specify the mapping from normalized device coordinates into window space.

Note

A reversed mapping of depth, such that points closer to the view have a window space depth that is greater than points further away can be achieved by making nearZ > farZ.

XrCompositionLayerDepthInfoKHR contains the information needed to associate depth with the color information in a projection layer. When submitting depth images along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.

The homogeneous transform from view space z to window space depth is given by the following matrix, where a = minDepth, b = maxDepth, n = nearZ, and f = farZ.

Homogeneous values are constructed from real values by appending a w component with value 1.0.

General homogeneous values are projected back to real space by dividing by the w component.

Valid Usage (Implicit)
See Also

XrCompositionLayerBaseHeader, XrCompositionLayerProjection, XrCompositionLayerProjectionView, XrFrameEndInfo, XrSwapchainSubImage, EndFrame

Layout


 struct XrCompositionLayerDepthInfoKHR {
     XrStructureType type();
     void const * next();
     XrSwapchainSubImage subImage();
     float minDepth();
     float maxDepth();
     float nearZ();
     float farZ();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • SUBIMAGE

      public static final int SUBIMAGE
      The struct member offsets.
    • MINDEPTH

      public static final int MINDEPTH
      The struct member offsets.
    • MAXDEPTH

      public static final int MAXDEPTH
      The struct member offsets.
    • NEARZ

      public static final int NEARZ
      The struct member offsets.
    • FARZ

      public static final int FARZ
      The struct member offsets.
  • Constructor Details

    • XrCompositionLayerDepthInfoKHR

      public XrCompositionLayerDepthInfoKHR(ByteBuffer container)
      Creates a XrCompositionLayerDepthInfoKHR instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details