C Specification

The XrCompositionLayerQuad structure defined as:

typedef struct XrCompositionLayerQuad {
    XrStructureType             type;
    const void* XR_MAY_ALIAS    next;
    XrCompositionLayerFlags     layerFlags;
    XrSpace                     space;
    XrEyeVisibility             eyeVisibility;
    XrSwapchainSubImage         subImage;
    XrPosef                     pose;
    XrVector2f                  size;
} XrCompositionLayerQuad;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

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

  • layerFlags is a bitmask of XrCompositionLayerFlagBits describing flags to apply to the layer.

  • space is the XrSpace in which the pose of the quad layer is evaluated over time.

  • eyeVisibility is the XrEyeVisibility for this layer.

  • subImage is the image layer XrSwapchainSubImage to use.

  • pose is an XrPosef defining the position and orientation of the quad in the reference frame of the space.

  • size is the x and y size of the quad.

Description

The XrCompositionLayerQuad layer is useful for user interface elements or 2D content rendered into the virtual world. The layer’s XrSwapchainSubImage::swapchain image is applied to a quad in the virtual world space. Only front face of the quad surface is visible; the back face is not visible and must not be drawn by the runtime. A quad layer has no thickness; it is a two-dimensional object positioned and oriented in 3D space. The position of a quad refers to the center of the quad within the given XrSpace. The orientation of the quad refers to the orientation of the normal vector from the front face. The size of a quad refers to the quad’s size in the x-y plane of the given XrSpace’s coordinate system. A quad with a position of {0,0,0}, rotation of {0,0,0,1} (no rotation), and a size of {1,1} refers to a 1 meter x 1 meter quad centered at {0,0,0} with its front face normal vector coinciding with the +z axis.

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.