Class KHRVisibilityMask
This extension support the providing of a per-view drawing mask for applications. The primary purpose of this is to enable performance improvements that result from avoiding drawing on areas that are not visible to the user. A common occurrence in head-mounted VR hardware is that the optical system’s frustum does not intersect precisely with the rectangular display it is viewing. As a result, it may be that there are parts of the display that are not visible to the user, such as the corners of the display. In such cases it would be unnecessary for the application to draw into those parts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intXrVisibilityMaskTypeKHR - Visibility Mask Typestatic final intXrVisibilityMaskTypeKHR - Visibility Mask Typestatic final intXrVisibilityMaskTypeKHR - Visibility Mask Type -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrGetVisibilityMaskKHR(XrSession session, int viewConfigurationType, int viewIndex, int visibilityMaskType, long visibilityMask) Unsafe version of:GetVisibilityMaskKHRstatic intxrGetVisibilityMaskKHR(XrSession session, int viewConfigurationType, int viewIndex, int visibilityMaskType, XrVisibilityMaskKHR visibilityMask) Gets visibility mask.
-
Field Details
-
XR_KHR_visibility_mask_SPEC_VERSION
public static final int XR_KHR_visibility_mask_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_KHR_VISIBILITY_MASK_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_VISIBILITY_MASK_KHR
public static final int XR_TYPE_VISIBILITY_MASK_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR
public static final int XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR
public static final int XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRXrVisibilityMaskTypeKHR - Visibility Mask TypeEnumerant Descriptions
VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should not be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_LINE_LOOP_KHRrefers to a single multi-segmented line loop on the view surface which encompasses the view area which should be drawn by the application. It is the border that exists between the visible and hidden meshes identified byVISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRandVISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR. The line is counter-clockwise, contiguous, and non-self crossing, with the last point implicitly connecting to the first point. There is one vertex per point, the index count will equal the vertex count, and the indices will refer to the vertices.
See Also
- See Also:
-
XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR
public static final int XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHRXrVisibilityMaskTypeKHR - Visibility Mask TypeEnumerant Descriptions
VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should not be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_LINE_LOOP_KHRrefers to a single multi-segmented line loop on the view surface which encompasses the view area which should be drawn by the application. It is the border that exists between the visible and hidden meshes identified byVISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRandVISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR. The line is counter-clockwise, contiguous, and non-self crossing, with the last point implicitly connecting to the first point. There is one vertex per point, the index count will equal the vertex count, and the indices will refer to the vertices.
See Also
- See Also:
-
XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHR
public static final int XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHRXrVisibilityMaskTypeKHR - Visibility Mask TypeEnumerant Descriptions
VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should not be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHRrefers to a two dimensional triangle mesh on the view surface which should be drawn to by the application.XrVisibilityMaskKHRrefers to a set of triangles identified by vertices and vertex indices. The index count will thus be a multiple of three. The triangle vertices will be returned in counter-clockwise order as viewed from the user perspective.VISIBILITY_MASK_TYPE_LINE_LOOP_KHRrefers to a single multi-segmented line loop on the view surface which encompasses the view area which should be drawn by the application. It is the border that exists between the visible and hidden meshes identified byVISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHRandVISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR. The line is counter-clockwise, contiguous, and non-self crossing, with the last point implicitly connecting to the first point. There is one vertex per point, the index count will equal the vertex count, and the indices will refer to the vertices.
See Also
- See Also:
-
-
Method Details
-
nxrGetVisibilityMaskKHR
public static int nxrGetVisibilityMaskKHR(XrSession session, int viewConfigurationType, int viewIndex, int visibilityMaskType, long visibilityMask) Unsafe version of:GetVisibilityMaskKHR -
xrGetVisibilityMaskKHR
public static int xrGetVisibilityMaskKHR(XrSession session, int viewConfigurationType, int viewIndex, int visibilityMaskType, XrVisibilityMaskKHR visibilityMask) Gets visibility mask.C Specification
The
GetVisibilityMaskKHRfunction is defined as:XrResult xrGetVisibilityMaskKHR( XrSession session, XrViewConfigurationType viewConfigurationType, uint32_t viewIndex, XrVisibilityMaskTypeKHR visibilityMaskType, XrVisibilityMaskKHR* visibilityMask);Description
GetVisibilityMaskKHRretrieves the view mask for a given view. This function follows the two-call idiom for filling multiple buffers in a struct. Specifically, if eitherXrVisibilityMaskKHR::vertexCapacityInputorXrVisibilityMaskKHR::indexCapacityInputis 0, the runtime must respond as if both fields were set to 0, returning the vertex count and index count throughXrVisibilityMaskKHR::vertexCountOutputorXrVisibilityMaskKHR::indexCountOutputrespectively. If a view mask for the specified view isn’t available, the returned vertex and index counts must be 0.Valid Usage (Implicit)
- The
XR_KHR_visibility_maskextension must be enabled prior to callingGetVisibilityMaskKHR sessionmust be a validXrSessionhandleviewConfigurationTypemust be a validXrViewConfigurationTypevaluevisibilityMaskTypemust be a validXrVisibilityMaskTypeKHRvaluevisibilityMaskmust be a pointer to anXrVisibilityMaskKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- anXrSessionhandle previously created withCreateSession.viewConfigurationType- the view configuration from which to retrieve mask information.viewIndex- the individual view within the view configuration from which to retrieve mask information.visibilityMaskType- the type of visibility mask requested.visibilityMask- an input/output struct which specifies the view mask.
- The
-