C Specification

The XrSpatialComponentMesh2DListEXT structure is defined as:

// Provided by XR_EXT_spatial_plane_tracking
typedef struct XrSpatialComponentMesh2DListEXT {
    XrStructureType          type;
    void*                    next;
    uint32_t                 meshCount;
    XrSpatialMeshDataEXT*    meshes;
} XrSpatialComponentMesh2DListEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • meshCount is a uint32_t describing the count of elements in the meshes array.

  • meshes is an array of XrSpatialMeshDataEXT.

Description

To query the mesh 2D component of the spatial entities in an XrSpatialSnapshotEXT, include XR_SPATIAL_COMPONENT_TYPE_MESH_2D_EXT in XrSpatialComponentDataQueryConditionEXT::componentTypes and add XrSpatialComponentMesh2DListEXT to the XrSpatialComponentDataQueryResultEXT::next chain.

The runtime must return XR_ERROR_VALIDATION_FAILURE from xrQuerySpatialComponentDataEXT if XrSpatialComponentMesh2DListEXT is in the XrSpatialComponentDataQueryResultEXT::next chain but XR_SPATIAL_COMPONENT_TYPE_MESH_2D_EXT is not included in XrSpatialComponentDataQueryConditionEXT::componentTypes.

The runtime must return XR_ERROR_SIZE_INSUFFICIENT from xrQuerySpatialComponentDataEXT if meshCount is less than XrSpatialComponentDataQueryResultEXT::entityIdCountOutput.

For the XrSpatialMeshDataEXT populated by the runtime in the meshes array, the XrSpatialBufferEXT::bufferType for XrSpatialMeshDataEXT::vertexBuffer must be XR_SPATIAL_BUFFER_TYPE_VECTOR2F_EXT and XrSpatialBufferEXT::bufferType for XrSpatialMeshDataEXT::indexBuffer must be XR_SPATIAL_BUFFER_TYPE_UINT16_EXT.

Valid Usage (Implicit)

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