C Specification

The xrCreateTriangleMeshFB function is defined as:

// Provided by XR_FB_triangle_mesh
XrResult xrCreateTriangleMeshFB(
    XrSession                                   session,
    const XrTriangleMeshCreateInfoFB*           createInfo,
    XrTriangleMeshFB*                           outTriangleMesh);

Parameters

Parameter Descriptions
  • session is the XrSession to which the mesh will belong.

  • createInfo is a pointer to an XrTriangleMeshCreateInfoFB structure containing parameters to be used to create the mesh.

  • outTriangleMesh is a pointer to a handle in which the created XrTriangleMeshFB is returned.

Description

This creates an XrTriangleMeshFB handle. The returned triangle mesh handle may be subsequently used in API calls.

When the mesh is mutable (the XR_TRIANGLE_MESH_MUTABLE_BIT_FB bit is set in XrTriangleMeshCreateInfoFB::flags), the created triangle mesh starts in the https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#fb_triangle_mesh_state_undefined_topology state.

Immutable meshes have no state machine; they may be considered to be in state https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#fb_triangle_mesh_state_ready with no valid edges leaving that state.

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_OUT_OF_MEMORY

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB

  • XR_ERROR_FEATURE_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.