C Specification

The XrVisibilityMaskKHR structure is an input/output struct which specifies the view mask.

// Provided by XR_KHR_visibility_mask
typedef struct XrVisibilityMaskKHR {
    XrStructureType    type;
    void*              next;
    uint32_t           vertexCapacityInput;
    uint32_t           vertexCountOutput;
    XrVector2f*        vertices;
    uint32_t           indexCapacityInput;
    uint32_t           indexCountOutput;
    uint32_t*          indices;
} XrVisibilityMaskKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

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

  • vertexCountOutput is filled in by the runtime with the count of vertices written or the required capacity in the case that vertexCapacityInput or indexCapacityInput is insufficient.

  • vertices is an array of vertices filled in by the runtime that specifies mask coordinates in the z=-1 plane of the rendered view—​i.e. one meter in front of the view. When rendering the mask for use in a projection layer, these vertices must be transformed by the application’s projection matrix used for the respective XrCompositionLayerProjectionView.

== Description

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

  • indexCountOutput is filled in by the runtime with the count of indices written or the required capacity in the case that vertexCapacityInput or indexCapacityInput is insufficient.

  • indices is an array of indices filled in by the runtime, specifying the indices of the mask geometry in the vertices array.

Valid Usage (Implicit)
  • The XR_KHR_visibility_mask extension must be enabled prior to using XrVisibilityMaskKHR

  • type must be XR_TYPE_VISIBILITY_MASK_KHR

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • If vertexCapacityInput is not 0, vertices must be a pointer to an array of vertexCapacityInput XrVector2f structures

  • If indexCapacityInput is not 0, indices must be a pointer to an array of indexCapacityInput uint32_t values

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-2024, The Khronos Group Inc.