C Specification

The xrCreatePassthroughLayerANDROID function is defined as:

// Provided by XR_ANDROID_composition_layer_passthrough_mesh
XrResult xrCreatePassthroughLayerANDROID(
    XrSession                                   session,
    const XrPassthroughLayerCreateInfoANDROID*  createInfo,
    XrPassthroughLayerANDROID*                  layer);

Parameters

Parameter Descriptions

Description

An application creates an XrPassthroughLayerANDROID handle by calling xrCreatePassthroughLayerANDROID.

The application should specify the maximum number of passthrough mesh indices it will submit for this layer in XrPassthroughLayerCreateInfoANDROID::vertexCapacity and XrPassthroughLayerCreateInfoANDROID::indexCapacity, and these values should be less than or equal to the maximum values returned by XrSystemPassthroughLayerPropertiesANDROID::maxMeshIndexCount and XrSystemPassthroughLayerPropertiesANDROID::maxMeshVertexCount when calling xrGetSystemProperties.

If XrPassthroughLayerCreateInfoANDROID::indexCapacity passed in createInfo is greater than XrSystemPassthroughLayerPropertiesANDROID::maxMeshIndexCount, the runtime must return the XR_ERROR_MESH_DATA_LIMIT_EXCEEDED_ANDROID error when calling xrCreatePassthroughLayerANDROID.

The XrPassthroughLayerANDROID handle must be eventually freed via the xrDestroyPassthroughLayerANDROID 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_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.