C Specification

The XrNegotiateApiLayerRequest structure is defined as:

typedef struct XrNegotiateApiLayerRequest {
    XrLoaderInterfaceStructs        structType;
    uint32_t                        structVersion;
    size_t                          structSize;
    uint32_t                        layerInterfaceVersion;
    XrVersion                       layerApiVersion;
    PFN_xrGetInstanceProcAddr       getInstanceProcAddr;
    PFN_xrCreateApiLayerInstance    createApiLayerInstance;
} XrNegotiateApiLayerRequest;

Members

Member Descriptions
  • structType must be XR_LOADER_INTERFACE_STRUCT_API_LAYER_REQUEST.

  • structVersion must be a valid version of the structure. The value XR_API_LAYER_INFO_STRUCT_VERSION is used to describe the current latest version of this structure.

  • structSize must be the size in bytes of the current version of the structure (i.e. sizeof(XrNegotiateApiLayerRequest)).

  • layerInterfaceVersion is the version of the API layer interface version being requested by the API layer. Should not be outside of the bounds of the XrNegotiateLoaderInfo::minInterfaceVersion and XrNegotiateLoaderInfo::maxInterfaceVersion values (inclusive).

  • layerApiVersion is the version of the OpenXR API supported by this API layer as formatted by XR_MAKE_VERSION. Patch is ignored.

  • getInstanceProcAddr is a pointer to the API layer’s xrGetInstanceProcAddr implementation that will be used by the loader to populate a dispatch table of OpenXR functions supported by the API layer.

  • createApiLayerInstance is a pointer to the API layer’s xrCreateApiLayerInstance implementation that will be used by the loader during a call to xrCreateInstance when an API layer is active. This is used because API layers need additional information at xrCreateInstance time.

Description

This is an output structure from API layer negotiation. The loader must populate structType, structVersion, and structSize before calling to ensure correct interpretation by the API layer, while the API layer populates the rest of the fields in a successful call to xrNegotiateLoaderApiLayerInterface.

Valid Usage (Implicit)

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.