C Specification

The xrGetVisibilityMaskKHR function is defined as:

// Provided by XR_KHR_visibility_mask
XrResult xrGetVisibilityMaskKHR(
    XrSession                                   session,
    XrViewConfigurationType                     viewConfigurationType,
    uint32_t                                    viewIndex,
    XrVisibilityMaskTypeKHR                     visibilityMaskType,
    XrVisibilityMaskKHR*                        visibilityMask);

Parameters

Parameter Descriptions
  • session is an XrSession handle previously created with xrCreateSession.

  • viewConfigurationType is the view configuration from which to retrieve mask information.

  • viewIndex is the individual view within the view configuration from which to retrieve mask information.

  • visibilityMaskType is the type of visibility mask requested.

  • visibilityMask is an input/output struct which specifies the view mask.

Description

xrGetVisibilityMaskKHR retrieves the view mask for a given view. This function follows the two-call idiom for filling multiple buffers in a struct. Specifically, if either XrVisibilityMaskKHR::vertexCapacityInput or XrVisibilityMaskKHR::indexCapacityInput is 0, the runtime must respond as if both fields were set to 0, returning the vertex count and index count through XrVisibilityMaskKHR::vertexCountOutput or XrVisibilityMaskKHR::indexCountOutput respectively. If a view mask for the specified view isn’t available, the returned vertex and index counts must be 0.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

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.