C Specification

The xrTriangleMeshGetIndexBufferFB function is defined as:

// Provided by XR_FB_triangle_mesh
XrResult xrTriangleMeshGetIndexBufferFB(
    XrTriangleMeshFB                            mesh,
    uint32_t**                                  outIndexBuffer);

Parameters

Parameter Descriptions
  • mesh is the XrTriangleMeshFB to get the index buffer for.

  • outIndexBuffer is a pointer to return the index buffer into.

Description

Retrieves a pointer to the index buffer that defines the topology of the triangle mesh. Each triplet of consecutive elements points to three vertices in the vertex buffer and thus form a triangle. The size of the index buffer is 3 * XrTriangleMeshCreateInfoFB::triangleCount elements. The buffer location is guaranteed to remain constant over the lifecycle of the mesh object.

A triangle mesh must be mutable and in state https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#fb_triangle_mesh_state_defining_topology or https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#fb_triangle_mesh_state_updating_mesh for the application to modify the contents and/or triangle count in the index buffer retrieved by this function.

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_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.