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::
structType
is notXR_LOADER_INTERFACE_STRUCT_LOADER_INFO
-
XrNegotiateLoaderInfo::
structVersion
is not XR_LOADER_INFO_STRUCT_VERSION -
XrNegotiateLoaderInfo::
structSize
is notsizeof(XrNegotiateLoaderInfo)
The runtime must also return XR_ERROR_INITIALIZATION_FAILED
if any of
the following conditions on runtimeRequest
are true:
-
XrNegotiateRuntimeRequest::
structType
is notXR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST
-
XrNegotiateRuntimeRequest::
structVersion
is not XR_RUNTIME_INFO_STRUCT_VERSION -
XrNegotiateRuntimeRequest::
structSize
is 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 the interface versions supported by the loader as specified by the parameters XrNegotiateLoaderInfo::
minInterfaceVersion
and XrNegotiateLoaderInfo::maxInterfaceVersion
-
the runtime does not support the API versions supported by the loader as specified by the parameters XrNegotiateLoaderInfo::
minApiVersion
and XrNegotiateLoaderInfo::maxApiVersion
.
The runtime must return XR_ERROR_INITIALIZATION_FAILED
if it does not
support the loader’s request.
The runtime must set the
XrNegotiateRuntimeRequest::runtimeInterfaceVersion
with the
runtime interface version it desires to support.
The XrNegotiateRuntimeRequest::runtimeInterfaceVersion
set must
be between XrNegotiateLoaderInfo::minInterfaceVersion
and
XrNegotiateLoaderInfo::maxInterfaceVersion
.
The runtime must set the
XrNegotiateRuntimeRequest::runtimeApiVersion
with the API
version of OpenXR it will execute under.
The XrNegotiateRuntimeRequest::runtimeApiVersion
set must be
between XrNegotiateLoaderInfo::minApiVersion
and
XrNegotiateLoaderInfo::maxApiVersion
.
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-2024, The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.