C Specification
The xrNegotiateLoaderRuntimeInterface function is defined as:
// Provided by XR_LOADER_VERSION_1_0
XrResult xrNegotiateLoaderRuntimeInterface(
const XrNegotiateLoaderInfo* loaderInfo,
XrNegotiateRuntimeRequest* runtimeRequest);
Parameters
Description
xrNegotiateLoaderRuntimeInterface should be directly exported by a
runtime so that using e.g. GetProcAddress on Windows or dlsym on POSIX
platforms returns a valid function pointer to it.
The runtime must return XR_ERROR_INITIALIZATION_FAILED if any of the
following conditions on loaderInfo are true:
-
XrNegotiateLoaderInfo::
structTypeis notXR_LOADER_INTERFACE_STRUCT_LOADER_INFO -
XrNegotiateLoaderInfo::
structVersionis not XR_LOADER_INFO_STRUCT_VERSION -
XrNegotiateLoaderInfo::
structSizeis notsizeof(XrNegotiateLoaderInfo)
The runtime must also return XR_ERROR_INITIALIZATION_FAILED if any of
the following conditions on runtimeRequest are true:
-
XrNegotiateRuntimeRequest::
structTypeis notXR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST -
XrNegotiateRuntimeRequest::
structVersionis not XR_RUNTIME_INFO_STRUCT_VERSION -
XrNegotiateRuntimeRequest::
structSizeis notsizeof(XrNegotiateRuntimeRequest)
The runtime must determine if it supports the loader’s request. The runtime does not support the loader’s request if either of the following is true:
-
The runtime does not support any of the interface versions supported by the loader, as specified by the range XrNegotiateLoaderInfo::
minInterfaceVersionthrough XrNegotiateLoaderInfo::maxInterfaceVersioninclusive. -
The runtime does not support any of the API versions supported by the loader, ignoring "patch" version components, as specified by the range XrNegotiateLoaderInfo::
minApiVersionthrough XrNegotiateLoaderInfo::maxApiVersioninclusive.
The runtime must return XR_ERROR_INITIALIZATION_FAILED if it does not
support the loader’s request.
If the function succeeds, the runtime must set the
XrNegotiateRuntimeRequest::runtimeInterfaceVersion with the
runtime interface version it desires to support.
The XrNegotiateRuntimeRequest::runtimeInterfaceVersion set must
be in the range XrNegotiateLoaderInfo::minInterfaceVersion
through XrNegotiateLoaderInfo::maxInterfaceVersion inclusive.
If the function succeeds, the runtime must set the
XrNegotiateRuntimeRequest::runtimeApiVersion with the API
version of OpenXR it will execute under.
The XrNegotiateRuntimeRequest::runtimeApiVersion set must be in
the range XrNegotiateLoaderInfo::minApiVersion through
XrNegotiateLoaderInfo::maxApiVersion inclusive.
If the function succeeds, the runtime must set the
XrNegotiateRuntimeRequest::getInstanceProcAddr with a valid
function pointer for the loader to use to query function pointers to the
remaining OpenXR functions supported by the runtime.
If the function succeeds, the runtime must return XR_SUCCESS.
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.