C Specification
To retrieve the Metal device that can be used in drawing operations, call:
// Provided by XR_KHR_metal_enable
XrResult xrGetMetalGraphicsRequirementsKHR(
XrInstance instance,
XrSystemId systemId,
XrGraphicsRequirementsMetalKHR* graphicsRequirements);
Parameters
Description
The xrGetMetalGraphicsRequirementsKHR function identifies to the
application the Metal device to be used in drawing operations.
The runtime must return XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING
on calls to xrCreateSession if xrGetMetalGraphicsRequirementsKHR
has not been called for the same instance and systemId.
The Metal device that xrGetMetalGraphicsRequirementsKHR returns must be used to create the Metal command queue that the application passes to xrCreateSession in the XrGraphicsBindingMetalKHR.
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
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.