C Specification

The XrRoomMeshMETA structure is defined as:

// Provided by XR_META_spatial_entity_room_mesh
typedef struct XrRoomMeshMETA {
    XrStructureType        type;
    void*                  next;
    uint32_t               vertexCapacityInput;
    uint32_t               vertexCountOutput;
    XrVector3f*            vertices;
    uint32_t               faceCapacityInput;
    uint32_t               faceCountOutput;
    XrRoomMeshFaceMETA*    faces;
} XrRoomMeshMETA;

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 an input parameter for the application to specify the capacity of the vertices array, or 0 to indicate a request to retrieve the required capacity.

  • vertexCountOutput is an output parameter that will hold the number of vertices written in the output array, or the required capacity in the case that vertexCapacityInput is insufficient. The returned value must be equal to or larger than 4.

  • vertices is a pointer to an array of XrVector3f, but can be NULL if vertexCapacityInput is 0. The vertices are defined in the coordinate frame of XrSpace to which this struct is associated.

  • faceCapacityInput is an input parameter for the application to specify the capacity of the faces array, or 0 to indicate a request to retrieve the required capacity.

  • faceCountOutput is an output parameter that will hold the number of faces written in the output array, or the required capacity in the case that faceCapacityInput is insufficient.

  • faces is a pointer to an array of XrRoomMeshFaceMETA, but can be NULL if faceCapacityInput is 0.

  • See the https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-buffer-size-parameters section for a detailed description of retrieving the required vertices and faces array sizes.

Description

The application uses the XrRoomMeshMETA structure to perform the two calls required to obtain a room mesh associated with a specified spatial entity.

The output values written in the faces array represent faces of the room mesh. Each face is represented with an XrRoomMeshFaceMETA structure as well as an XrRoomMeshFaceIndicesMETA structure that can be separately obtained by using the xrGetSpaceRoomMeshFaceIndicesMETA function. The faces of the room mesh must define a closed 3D volume. The faces must not have overlaps with each other.

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