C Specification

The xrNegotiateLoaderRuntimeInterface function is defined as:

// Provided by XR_LOADER_VERSION_1_0
XrResult xrNegotiateLoaderRuntimeInterface(
    const XrNegotiateLoaderInfo*                loaderInfo,
    XrNegotiateRuntimeRequest*                  runtimeRequest);

Parameters

Parameter Descriptions
  • loaderInfo must be a pointer to a valid XrNegotiateLoaderInfo structure.

  • runtimeRequest must be a valid pointer to an XrNegotiateRuntimeRequest structure, with minimal initialization, as subsequently described, to be fully populated by the called runtime.

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:

The runtime must also return XR_ERROR_INITIALIZATION_FAILED if any of the following conditions on runtimeRequest are true:

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 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.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INITIALIZATION_FAILED

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-2024, The Khronos Group Inc.