C Specification

The xrSetPassthroughLayerMeshANDROID function is defined as:

// Provided by XR_ANDROID_composition_layer_passthrough_mesh
XrResult xrSetPassthroughLayerMeshANDROID(
    XrPassthroughLayerANDROID                   layer,
    const XrPassthroughLayerMeshANDROID*        mesh);

Parameters

Parameter Descriptions

An application sets the mesh for a passthrough layer by calling the xrSetPassthroughLayerMeshANDROID function.

Description

The application should specify the number of passthrough mesh indices in the XrPassthroughLayerMeshANDROID::vertexCount and XrPassthroughLayerMeshANDROID::indexCount less than or equal to the maximum values returned by XrSystemPassthroughLayerPropertiesANDROID::maxMeshIndexCount and XrSystemPassthroughLayerPropertiesANDROID::maxMeshVertexCount when calling xrGetSystemProperties. The runtime must return XR_ERROR_MESH_DATA_LIMIT_EXCEEDED_ANDROID error on xrSetPassthroughLayerMeshANDROID if the count of mesh indices or vertices given by mesh is greater than the maximum values.

If XrPassthroughLayerCreateInfoANDROID::vertexCapacity or XrPassthroughLayerCreateInfoANDROID::indexCapacity are specified when creating the layer via xrCreatePassthroughLayerANDROID, the runtime must return XR_ERROR_SIZE_INSUFFICIENT error on xrSetPassthroughLayerMeshANDROID if the count of mesh vertices or indices defined by mesh is greater than the respective application specified capacity.

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_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_MESH_DATA_LIMIT_EXCEEDED_ANDROID

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

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.