Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

OpenXR Commands

xrAcquireSwapchainImage(3)

Name

xrAcquireSwapchainImage - Acquire a swapchain image

C Specification

The xrAcquireSwapchainImage function is defined as:

XrResult xrAcquireSwapchainImage(
    XrSwapchain                                 swapchain,
    const XrSwapchainImageAcquireInfo*          acquireInfo,
    uint32_t*                                   index);

Parameters

Parameter Descriptions
  • swapchain is the swapchain from which to acquire an image.

  • acquireInfo exists for extensibility purposes, it is NULL or a pointer to a valid XrSwapchainImageAcquireInfo.

  • index is a pointer to the image index that was acquired.

Description

Acquires the image corresponding to the index position in the array returned by xrEnumerateSwapchainImages. The runtime must return XR_ERROR_CALL_ORDER_INVALID if index has already been acquired and not yet released with xrReleaseSwapchainImage. If the swapchain was created with the XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT set in XrSwapchainCreateInfo::createFlags, this function must not have been previously called for this swapchain. The runtime must return XR_ERROR_CALL_ORDER_INVALID if a swapchain created with the XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT set in XrSwapchainCreateInfo::createFlags and this function has been successfully called previously for this swapchain.

Valid Usage (Implicit)
  • swapchain must be a valid XrSwapchain handle

  • If acquireInfo is not NULL, acquireInfo must be a pointer to a valid XrSwapchainImageAcquireInfo structure

  • index must be a pointer to a uint32_t value

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_CALL_ORDER_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrApplyHapticFeedback(3)

Name

xrApplyHapticFeedback - Apply haptic feedback

C Specification

The xrApplyHapticFeedback function is defined as:

XrResult xrApplyHapticFeedback(
    XrSession                                   session,
    const XrHapticActionInfo*                   hapticActionInfo,
    const XrHapticBaseHeader*                   hapticFeedback);

Parameters

Parameter Descriptions
  • session is the XrSession to start outputting to.

  • hapticActionInfo is a pointer to XrHapticActionInfo to provide action and subaction paths information.

  • hapticFeedback is a pointer to a haptic event structure which starts with an XrHapticBaseHeader.

Description

Triggers a haptic event through the specified action of type XR_TYPE_HAPTIC_VIBRATION. The runtime should deliver this request to the appropriate device, but exactly which device, if any, this event is sent to is up to the runtime to decide. If an appropriate device is unavailable the runtime may ignore this request for haptic feedback.

If another haptic event from this session is currently happening on the device bound to this action, the runtime must interrupt that other event and replace it with the new one.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrAttachSessionActionSets(3)

Name

xrAttachSessionActionSets - Attaches action sets to a given session

C Specification

The xrAttachSessionActionSets function is defined as:

XrResult xrAttachSessionActionSets(
    XrSession                                   session,
    const XrSessionActionSetsAttachInfo*        attachInfo);

Parameters

Parameter Descriptions

Description

xrAttachSessionActionSets attaches the XrActionSet handles in attachInfo.actionSets to the session. Action sets must be attached in order to be synchronized with xrSyncActions.

When an action set is attached to a session, that action set becomes immutable. See xrCreateAction and xrSuggestInteractionProfileBindings for details.

The runtime must return XR_ERROR_ACTIONSETS_ALREADY_ATTACHED if xrAttachSessionActionSets is called more than once for a given session. The runtime must return XR_ERROR_ACTIONSET_NOT_ATTACHED for any action created after xrAttachSessionActionSets is called for a given session if that handle is used with any call for the same session.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_ACTIONSETS_ALREADY_ATTACHED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrBeginFrame(3)

Name

xrBeginFrame - Marks a frame

C Specification

The xrBeginFrame function is defined as:

XrResult xrBeginFrame(
    XrSession                                   session,
    const XrFrameBeginInfo*                     frameBeginInfo);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • frameBeginInfo exists for extensibility purposes, it is NULL or a pointer to a valid XrFrameBeginInfo.

Description

xrBeginFrame is called prior to the start of frame rendering. The application should still call xrBeginFrame but omit rendering work for the frame if XrFrameState::shouldRender is XR_FALSE.

The runtime must return the success code XR_FRAME_DISCARDED if a prior xrBeginFrame has been called without an intervening call to xrEndFrame.

The runtime must consider the frame in-progress and ready for an xrEndFrame call if a success code is returned.

The runtime must return XR_ERROR_SESSION_NOT_RUNNING if the session is not running.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • If frameBeginInfo is not NULL, frameBeginInfo must be a pointer to a valid XrFrameBeginInfo structure

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

  • XR_FRAME_DISCARDED

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrBeginSession(3)

Name

xrBeginSession - Begins an XrSession

C Specification

The xrBeginSession function is defined as:

XrResult xrBeginSession(
    XrSession                                   session,
    const XrSessionBeginInfo*                   beginInfo);

Parameters

Parameter Descriptions

Description

When the application receives XrEventDataSessionStateChanged event with the XR_SESSION_STATE_READY state, the application should then call xrBeginSession to start rendering frames for display to the user.

After this function successfully returns, the session is considered to be running. The application should then start its frame loop consisting of some sequence of xrWaitFrame/xrBeginFrame/xrEndFrame calls.

If the session is already running when the application calls xrBeginSession, the runtime must return error XR_ERROR_SESSION_RUNNING. If the session is not running when the application calls xrBeginSession, but the session is not yet in the XR_SESSION_STATE_READY state, the runtime must return error XR_ERROR_SESSION_NOT_READY.

Note that a runtime may decide not to show the user any given frame from a session at any time, for example if the user has switched to a different application’s running session. The application should check whether xrWaitFrame returns an XrFrameState with shouldRender set to true before rendering a given frame to determine whether that frame will be visible to the user.

If primaryViewConfigurationType in beginInfo is not supported by the XrSystemId used to create the session, the runtime must return XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SESSION_NOT_READY

  • XR_ERROR_SESSION_RUNNING

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrConvertTimeToTimespecTimeKHR(3)

Name

xrConvertTimeToTimespecTimeKHR - Convert XrTime to timespec monotonic time

C Specification

To convert from XrTime to timespec monotonic time, call:

XrResult xrConvertTimeToTimespecTimeKHR(
    XrInstance                                  instance,
    XrTime                                      time,
    struct timespec*                            timespecTime);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • time is an XrTime.

  • unixTime is the resulting timespec time that is equivalent to a timespec obtained from clock_gettime with CLOCK_MONOTONIC.

Description

The xrConvertTimeToTimespecTimeKHR function converts an XrTime to time as if generated by clock_gettime.

If the output unixTime cannot represent the input time, the runtime must return XR_ERROR_TIME_INVALID.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrConvertTimeToWin32PerformanceCounterKHR(3)

Name

xrConvertTimeToWin32PerformanceCounterKHR - Convert XrTime to Win32 QueryPerformanceCounter time

C Specification

To convert from XrTime to a Windows performance counter time stamp, call:

XrResult xrConvertTimeToWin32PerformanceCounterKHR(
    XrInstance                                  instance,
    XrTime                                      time,
    LARGE_INTEGER*                              performanceCounter);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • time is an XrTime.

  • performanceCounter is the resulting Windows performance counter time stamp that is equivalent to the time.

Description

The xrConvertTimeToWin32PerformanceCounterKHR function converts an XrTime to time as if generated by the QueryPerformanceCounter Windows function.

If the output performanceCounter cannot represent the input time, the runtime must return XR_ERROR_TIME_INVALID.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrConvertTimespecTimeToTimeKHR(3)

Name

xrConvertTimespecTimeToTimeKHR - Convert timespec monotonic time to XrTime

C Specification

To convert from timespec monotonic time to XrTime, call:

XrResult xrConvertTimespecTimeToTimeKHR(
    XrInstance                                  instance,
    const struct timespec*                      timespecTime,
    XrTime*                                     time);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • unixTime is a timespec obtained from clock_gettime with CLOCK_MONOTONIC.

  • time is the resulting XrTime that is equivalent to the unixTime.

Description

The xrConvertTimespecTimeToTimeKHR function converts a time obtained by the clock_gettime function to the equivalent XrTime.

If the output time cannot represent the input unixTime, the runtime must return XR_ERROR_TIME_INVALID.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrConvertWin32PerformanceCounterToTimeKHR(3)

Name

xrConvertWin32PerformanceCounterToTimeKHR - Convert Win32 QueryPerformanceCounter time to XrTime

C Specification

To convert from a Windows performance counter time stamp to XrTime, call:

XrResult xrConvertWin32PerformanceCounterToTimeKHR(
    XrInstance                                  instance,
    const LARGE_INTEGER*                        performanceCounter,
    XrTime*                                     time);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • performanceCounter is a time returned by QueryPerformanceCounter.

  • time is the resulting XrTime that is equivalent to the performanceCounter.

Description

The xrConvertWin32PerformanceCounterToTimeKHR function converts a time stamp obtained by the QueryPerformanceCounter Windows function to the equivalent XrTime.

If the output time cannot represent the input performanceCounter, the runtime must return XR_ERROR_TIME_INVALID.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateAction(3)

Name

xrCreateAction - Creates an XrAction

C Specification

The xrCreateAction function is defined as:

XrResult xrCreateAction(
    XrActionSet                                 actionSet,
    const XrActionCreateInfo*                   createInfo,
    XrAction*                                   action);

Parameters

Parameter Descriptions
  • actionSet is a handle to an XrActionSet.

  • createInfo is a pointer to a valid XrActionCreateInfo structure that defines the action being created.

  • action is a pointer to an XrAction where the created action is returned.

Description

xrCreateAction creates an action and returns its handle.

If actionSet has been included in a call to xrAttachSessionActionSets, the implementation must return XR_ERROR_ACTIONSETS_ALREADY_ATTACHED.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_ACTIONSETS_ALREADY_ATTACHED

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_NAME_DUPLICATED

  • XR_ERROR_NAME_INVALID

  • XR_ERROR_PATH_FORMAT_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateActionSet(3)

Name

xrCreateActionSet - Creates an XrActionSet

C Specification

The xrCreateActionSet function is defined as:

XrResult xrCreateActionSet(
    XrInstance                                  instance,
    const XrActionSetCreateInfo*                createInfo,
    XrActionSet*                                actionSet);

Parameters

Parameter Descriptions
  • instance is a handle to an XrInstance.

  • createInfo is a pointer to a valid XrActionSetCreateInfo structure that defines the action set being created.

  • actionSet is a pointer to an XrActionSet where the created action set is returned.

Description

The xrCreateActionSet function creates an action set and returns a handle to the created action set.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_NAME_DUPLICATED

  • XR_ERROR_NAME_INVALID

  • XR_ERROR_PATH_FORMAT_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateActionSpace(3)

Name

xrCreateActionSpace - Creates a space based on a pose action

C Specification

The xrCreateActionSpace function is defined as:

XrResult xrCreateActionSpace(
    XrSession                                   session,
    const XrActionSpaceCreateInfo*              createInfo,
    XrSpace*                                    space);

Parameters

Parameter Descriptions
  • session is the XrSession to create the action space in.

  • createInfo is the XrActionSpaceCreateInfo used to specify the space.

  • space is the returned space handle.

Description

Creates an XrSpace handle based on a chosen pose action. Application can provide an XrPosef to define the position and orientation of the new space’s origin within the natural reference frame of the action space.

Multiple XrSpace handles may exist simultaneously, up to some limit imposed by the runtime. The XrSpace handle must be eventually freed via the xrDestroySpace function or by destroying the parent XrAction handle.

The runtime must return XR_ERROR_ACTION_TYPE_MISMATCH if the action provided in action is not of type XR_ACTION_TYPE_POSE_INPUT.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_UNSUPPORTED

  • XR_ERROR_PATH_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateDebugUtilsMessengerEXT(3)

Name

xrCreateDebugUtilsMessengerEXT - Creates a debug messenger

C Specification

XrResult xrCreateDebugUtilsMessengerEXT(
    XrInstance                                  instance,
    const XrDebugUtilsMessengerCreateInfoEXT*   createInfo,
    XrDebugUtilsMessengerEXT*                   messenger);

Parameters

Parameter Descriptions
  • instance is the instance the messenger will be used with.

  • createInfo points to an XrDebugUtilsMessengerCreateInfoEXT structure, which contains the callback pointer as well as defines the conditions under which this messenger will trigger the callback.

  • messenger is a pointer to which the created XrDebugUtilsMessengerEXT object is returned.

Description

Valid Usage (Implicit)
Thread Safety
  • Access to instance, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_FUNCTION_UNSUPPORTED

The application must ensure that xrCreateDebugUtilsMessengerEXT is not executed in parallel with any OpenXR function that is also called with instance or child of instance.

When an event of interest occurs a debug messenger calls its createInfo->userCallback with a debug message from the producer of the event. Additionally, the debug messenger must filter out any debug messages that the application’s callback is not interested in based on XrDebugUtilsMessengerCreateInfoEXT flags, as described below.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateInstance(3)

Name

xrCreateInstance - Creates an OpenXR Instance

C Specification

The xrCreateInstance function is defined as:

XrResult xrCreateInstance(
    const XrInstanceCreateInfo*                 createInfo,
    XrInstance*                                 instance);

Parameters

Parameter Descriptions
  • createInfo points to an instance of XrInstanceCreateInfo controlling creation of the instance.

  • instance points to an XrInstance handle in which the resulting instance is returned.

Description

xrCreateInstance creates the XrInstance, then enables and initializes global API layers and extensions requested by the application. If an extension is provided by an API layer, both the API layer and extension must be specified at xrCreateInstance time. If a specified API layer cannot be found, no XrInstance will be created and the function will return XR_ERROR_API_LAYER_NOT_PRESENT. Likewise, if a specified extension cannot be found, the call must return XR_ERROR_EXTENSION_NOT_PRESENT and no XrInstance will be created. Additionally, some runtimes may limit the number of concurrent instances that may be in use. If the application attempts to create more instances than a runtime can simultaneously support, xrCreateInstance may return XR_ERROR_LIMIT_REACHED.

If the XrApplicationInfo::applicationName is the empty string the runtime must return XR_ERROR_NAME_INVALID.

If the XrInstanceCreateInfo structure contains a platform-specific extension for a platform other than the target platform, XR_ERROR_INITIALIZATION_FAILED may be returned. If a mandatory platform-specific extension is defined for the target platform but no matching extension struct is provided in XrInstanceCreateInfo the runtime must return XR_ERROR_INITIALIZATION_FAILED.

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

On failure, this command returns
  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_INITIALIZATION_FAILED

  • XR_ERROR_API_VERSION_UNSUPPORTED

  • XR_ERROR_API_LAYER_NOT_PRESENT

  • XR_ERROR_EXTENSION_NOT_PRESENT

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_NAME_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateReferenceSpace(3)

Name

xrCreateReferenceSpace - Creates a reference space

C Specification

The xrCreateReferenceSpace function is defined as:

XrResult xrCreateReferenceSpace(
    XrSession                                   session,
    const XrReferenceSpaceCreateInfo*           createInfo,
    XrSpace*                                    space);

Parameters

Parameter Descriptions

Description

Creates an XrSpace handle based on a chosen reference space. Application can provide an XrPosef to define the position and orientation of the new space’s origin within the natural reference frame of the reference space.

Multiple XrSpace handles may exist simultaneously, up to some limit imposed by the runtime. The XrSpace handle must be eventually freed via the xrDestroySpace function.

The runtime must return XR_ERROR_REFERENCE_SPACE_UNSUPPORTED if the given reference space type is not supported by this session.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_REFERENCE_SPACE_UNSUPPORTED

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateSession(3)

Name

xrCreateSession - Creates an XrSession

C Specification

The xrCreateSession function is defined as:

XrResult xrCreateSession(
    XrInstance                                  instance,
    const XrSessionCreateInfo*                  createInfo,
    XrSession*                                  session);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • createInfo is a pointer to an XrSessionCreateInfo structure containing information about how to create the session.

  • session is a pointer to a handle in which the created XrSession is returned.

Description

Creates a session using the provided createInfo and returns a handle to that session. This session is created in the XR_SESSION_STATE_IDLE state.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_INITIALIZATION_FAILED

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_GRAPHICS_DEVICE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateSpatialAnchorMSFT(3)

Name

xrCreateSpatialAnchorMSFT - Creates a spatial anchor

C Specification

The xrCreateSpatialAnchorMSFT function is defined as:

XrResult xrCreateSpatialAnchorMSFT(
    XrSession                                   session,
    const XrSpatialAnchorCreateInfoMSFT*        createInfo,
    XrSpatialAnchorMSFT*                        anchor);

Parameters

Parameter Descriptions

Description

Creates an XrSpatialAnchorMSFT handle representing a spatial anchor that will track a fixed location in the physical world over time. That real-world location is specified by the position and orientation of the specified pose within space at time.

If space cannot be located relative to the environment at the moment of the call to xrCreateSpatialAnchorMSFT, the runtime must return XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT.

After the anchor is created, the runtime should then adjust its position and orientation over time relative to other spaces so as to maintain maximum alignment to its original real-world location, even if that changes the anchor’s relationship to the original space used to initialize it.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_SESSION_LOST

  • XR_SESSION_LOSS_PENDING

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateSpatialAnchorSpaceMSFT(3)

Name

xrCreateSpatialAnchorSpaceMSFT - Creates a space from a spatial anchor

C Specification

The xrCreateSpatialAnchorSpaceMSFT function is defined as:

XrResult xrCreateSpatialAnchorSpaceMSFT(
    XrSession                                   session,
    const XrSpatialAnchorSpaceCreateInfoMSFT*   createInfo,
    XrSpace*                                    space);

Parameters

Parameter Descriptions

Description

Creates an XrSpace handle based on a spatial anchor. Application can provide an XrPosef to define the position and orientation of the new space’s origin relative to the anchor’s natural origin.

Multiple XrSpace handles may exist for a given XrSpatialAnchorMSFT simultaneously, up to some limit imposed by the runtime. The XrSpace handle must be eventually freed via the xrDestroySpace function or by destroying the parent XrSpatialAnchorMSFT handle.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_SESSION_LOST

  • XR_SESSION_LOSS_PENDING

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateSwapchain(3)

Name

xrCreateSwapchain - Creates an XrSwapchain

C Specification

The xrCreateSwapchain function is defined as:

XrResult xrCreateSwapchain(
    XrSession                                   session,
    const XrSwapchainCreateInfo*                createInfo,
    XrSwapchain*                                swapchain);

Parameters

Parameter Descriptions
  • session is the session that creates the image.

  • createInfo is a pointer to an XrSwapchainCreateInfo structure containing parameters to be used to create the image.

  • swapchain is a pointer to a handle in which the created XrSwapchain is returned.

Description

Creates an XrSwapchain handle. The returned swapchain handle may be subsequently used in API calls. Multiple XrSwapchain handles may exist simultaneously, up to some limit imposed by the runtime. The XrSwapchain handle must be eventually freed via the xrDestroySwapchain function. The runtime must return XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED if the image format specified in the XrSwapchainCreateInfo is unsupported. The runtime must return XR_ERROR_FEATURE_UNSUPPORTED if any bit of the create flags specified in the XrSwapchainCreateInfo is unsupported.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED

  • XR_ERROR_FEATURE_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrCreateSwapchainAndroidSurfaceKHR(3)

Name

xrCreateSwapchainAndroidSurfaceKHR - Creates a swapchain and an Android Surface

C Specification

To create an XrSwapchain object and an Android Surface object call:

XrResult xrCreateSwapchainAndroidSurfaceKHR(
    XrSession                                   session,
    const XrSwapchainCreateInfo*                info,
    XrSwapchain*                                swapchain,
    jobject*                                    surface);

Parameters

Parameter Descriptions
  • session is an XrSession handle previously created with xrCreateSession.

  • info is a pointer to an XrSwapchainCreateInfo structure.

  • swapchain is a pointer to a handle in which the created XrSwapchain is returned.

  • surface is a pointer to a jobject where the created Android Surface is returned.

Description

xrCreateSwapchainAndroidSurfaceKHR creates an XrSwapchain object returned in swapchain and an Android Surface jobject returned in surface. The jobject must be valid to be passed back to Java code using JNI and must be valid to be used with ordinary Android APIs for submitting images to Surfaces. The returned XrSwapchain must be valid to be referenced in XrSwapchainSubImage structures to show content on the screen. The width and height passed in XrSwapchainCreateInfo may not be persistent throughout the life cycle of the created swapchain, since on Android, the size of the images is controlled by the producer and possibly changes at any time.

The only function that is allowed to be called on the XrSwapchain returned from this function is xrDestroySwapchain. For example, calling any of the functions xrEnumerateSwapchainImages, xrAcquireSwapchainImage, xrWaitSwapchainImage or xrReleaseSwapchainImage is invalid.

When the application receives the XrEventDataSessionStateChanged event with the XR_SESSION_STATE_STOPPING state, it must ensure that no threads are writing to any of the Android surfaces created with this extension before calling xrEndSession. The effect of writing frames to the Surface when the session is in states other than XR_SESSION_STATE_VISIBLE or XR_SESSION_STATE_FOCUSED is undefined.

xrCreateSwapchainAndroidSurfaceKHR must return the same set of error codes as xrCreateSwapchain under the same circumstances, plus XR_ERROR_FUNCTION_UNSUPPORTED in case the function is not supported.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroyAction(3)

Name

xrDestroyAction - Destroys an XrAction

C Specification

The xrDestroyAction function is defined as:

XrResult xrDestroyAction(
    XrAction                                    action);

Parameters

Parameter Descriptions
  • action is the action to destroy.

Description

Action handles can be destroyed by calling xrDestroyAction. Handles for actions that are part of an action set are automatically destroyed when the action set’s handle is destroyed.

The implementation must not destroy the underlying resources for an action when xrDestroyAction is called. Those resources are still used to make action spaces locatable and when processing action priority in xrSyncActions. Destroying the action handle removes the application’s access to these resources, but has no other change on actions.

Resources for all actions in an instance must be freed when the instance containing those actions sets is destroyed.

Valid Usage (Implicit)
  • action must be a valid XrAction handle

Thread Safety
  • Access to action, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroyActionSet(3)

Name

xrDestroyActionSet - Destroys an XrActionSet

C Specification

The xrDestroyActionSet function is defined as:

XrResult xrDestroyActionSet(
    XrActionSet                                 actionSet);

Parameters

Parameter Descriptions
  • actionSet is the action set to destroy.

Description

Action set handles can be destroyed by calling xrDestroyActionSet. When an action set handle is destroyed, all handles of actions in that action set are also destroyed.

The implementation must not free underlying resources for the action set while there are other valid handles that refer to those resources. The implementation may release resources for an action set when all of the action spaces for actions in that action set have been destroyed. See Action Spaces Lifetime for details.

Resources for all action sets in an instance must be freed when the instance containing those actions sets is destroyed.

Valid Usage (Implicit)
Thread Safety
  • Access to actionSet, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroyDebugUtilsMessengerEXT(3)

Name

xrDestroyDebugUtilsMessengerEXT - Destroys a debug messenger

C Specification

XrResult xrDestroyDebugUtilsMessengerEXT(
    XrDebugUtilsMessengerEXT                    messenger);

Parameters

Parameter Descriptions

Description

Valid Usage (Implicit)
Thread Safety
  • Access to messenger must be externally synchronized

  • Access to the XrInstance used to create messenger, and all of its child handles must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

The application must ensure that xrDestroyDebugUtilsMessengerEXT is not executed in parallel with any OpenXR function that is also called with the instance or child of instance that it was created with.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroyInstance(3)

Name

xrDestroyInstance - Destroy an instance of OpenXR

C Specification

The xrDestroyInstance function is defined as:

XrResult xrDestroyInstance(
    XrInstance                                  instance);

Parameters

The xrDestroyInstance function is used to destroy an XrInstance.

Description

Parameter Descriptions
  • instance is the handle to the instance to destroy.

XrInstance handles are destroyed using xrDestroyInstance. When an XrInstance is destroyed, all handles that are children of that XrInstance are also destroyed.

Valid Usage (Implicit)
Thread Safety
  • Access to instance, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroySession(3)

Name

xrDestroySession - Destroys an XrSession

C Specification

The xrDestroySession function is defined as.

XrResult xrDestroySession(
    XrSession                                   session);

Parameters

Parameter Descriptions
  • session is the session to destroy.

Description

XrSession handles are destroyed using xrDestroySession. When an XrSession is destroyed, all handles that are children of that XrSession are also destroyed.

The application is responsible for ensuring that it has no calls using session in progress when the session is destroyed.

xrDestroySession can be called when the session is in any session state.

Valid Usage (Implicit)
Thread Safety
  • Access to session, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroySpace(3)

Name

xrDestroySpace - Creates a space based on a pose action

C Specification

The xrDestroySpace function is defined as:

XrResult xrDestroySpace(
    XrSpace                                     space);

Parameters

Parameter Descriptions

Description

XrSpace handles are destroyed using xrDestroySpace. The runtime may still use this space if there are active dependencies (e.g, compositions in progress).

Valid Usage (Implicit)
  • space must be a valid XrSpace handle

Thread Safety
  • Access to space, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroySpatialAnchorMSFT(3)

Name

xrDestroySpatialAnchorMSFT - Destroys a spatial anchor

C Specification

The xrDestroySpatialAnchorMSFT function is defined as:

XrResult xrDestroySpatialAnchorMSFT(
    XrSpatialAnchorMSFT                         anchor);

Parameters

Parameter Descriptions

Description

XrSpatialAnchorMSFT handles are destroyed using xrDestroySpatialAnchorMSFT. By destroying an anchor, the runtime can stop spending resources used to maintain tracking for that anchor’s origin.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrDestroySwapchain(3)

Name

xrDestroySwapchain - Destroys an XrSwapchain

C Specification

The xrDestroySwapchain function is defined as:

XrResult xrDestroySwapchain(
    XrSwapchain                                 swapchain);

Parameters

Parameter Descriptions
  • swapchain is the swapchain to destroy.

Description

All submitted graphics API commands that refer to swapchain must have completed execution. Runtimes may continue to utilize swapchain images after xrDestroySwapchain is called.

Valid Usage (Implicit)
Thread Safety
  • Access to swapchain, and any child handles, must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEndFrame(3)

Name

xrEndFrame - Marks a frame

C Specification

The xrEndFrame function is defined as:

XrResult xrEndFrame(
    XrSession                                   session,
    const XrFrameEndInfo*                       frameEndInfo);

Parameters

Parameter Descriptions

Description

xrEndFrame may return immediately to the application. There is no strong coupling between a specific call to xrWaitFrame, and a specific frame description in xrEndFrame. However, XrFrameEndInfo does include a display time, which should be computed using values returned by xrWaitFrame. The runtime should be robust against variations in the timing of calls to xrWaitFrame, since a pipelined system may call xrWaitFrame on a separate thread from xrBeginFrame and xrEndFrame without any synchronization guarantees.

Note

An accurate predicted display time is very important to avoid black pull-in by reprojection and to reduce motion judder in case the runtime does not implement a translational reprojection. Reprojection should never display images before the display refresh period they were predicted for, even if they are completed early, because this will cause motion judder just the same. In other words, the better the predicted display time, the less latency experienced by the user.

Every call to xrEndFrame must be preceded by a successful call to xrBeginFrame. Failure to do so must result in XR_ERROR_CALL_ORDER_INVALID being returned by xrEndFrame. XrFrameEndInfo may reference swapchains into which the application has rendered for this frame. From each XrSwapchain only one image index is implicitly referenced per frame, the one corresponding to the last call to xrReleaseSwapchainImage. However, a specific swapchain (and by extension a specific swapchain image index) may be referenced in XrFrameEndInfo multiple times. This can be used for example to render a side by side image into a single swapchain image and referencing it twice with differing image rectangles in different layers.

If no layers are provided then the display must be cleared.

XR_ERROR_LAYER_INVALID must be returned if an unknown, unsupported layer type, or NULL pointer is passed as one of the XrFrameEndInfo::layers.

XR_ERROR_LAYER_LIMIT_EXCEEDED must be returned if XrFrameEndInfo::layerCount exceeds XrSystemGraphicsProperties::maxLayerCount or if the runtime is unable to composite the specified layers due to resource constraints.

XR_ERROR_SWAPCHAIN_RECT_INVALID must be returned if XrFrameEndInfo::layers contains a composition layer which references pixels outside of the associated swapchain image or if negatively sized.

XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED must be returned if XrFrameEndInfo::environmentBlendMode is not supported.

XR_ERROR_SESSION_NOT_RUNNING must be returned if the session is not running.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_CALL_ORDER_INVALID

  • XR_ERROR_LAYER_INVALID

  • XR_ERROR_SWAPCHAIN_RECT_INVALID

  • XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_LAYER_LIMIT_EXCEEDED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEndSession(3)

Name

xrEndSession - Ends an XrSession

C Specification

The xrEndSession function is defined as:

XrResult xrEndSession(
    XrSession                                   session);

Parameters

Parameter Descriptions

Description

When the application receives XrEventDataSessionStateChanged event with the XR_SESSION_STATE_STOPPING state, the application should stop its frame loop and then call xrEndSession to end the running session. This function signals to the runtime that the application will no longer call xrWaitFrame, xrBeginFrame or xrEndFrame from any thread. The application must also avoid reading input state or sending haptic output after calling xrEndSession.

If the session is not running when the application calls xrEndSession, the runtime must return error XR_ERROR_SESSION_NOT_RUNNING. If the session is still running when the application calls xrEndSession, but the session is not yet in the XR_SESSION_STATE_STOPPING state, the runtime must return error XR_ERROR_SESSION_NOT_STOPPING.

If the application wishes to exit a session that is running but not in the XR_SESSION_STATE_STOPPING state, the application should call xrRequestExitSession. This requests that the runtime transition to the XR_SESSION_STATE_STOPPING state, so that the application can call xrEndSession, after which the session will transition through XR_SESSION_STATE_IDLE to the XR_SESSION_STATE_EXITING state and quit the XR experience seamlessly.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SESSION_NOT_STOPPING

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateApiLayerProperties(3)

Name

xrEnumerateApiLayerProperties - Returns up to requested number of global layer properties

C Specification

To determine what set of API layers are available, OpenXR provides the xrEnumerateApiLayerProperties function:

XrResult xrEnumerateApiLayerProperties(
    uint32_t                                    propertyCapacityInput,
    uint32_t*                                   propertyCountOutput,
    XrApiLayerProperties*                       properties);

Parameters

Parameter Descriptions
  • propertyCapacityInput is the capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.

  • propertyCountOutput is a pointer to the count of properties written, or a pointer to the required capacity in the case that propertyCapacityInput is 0.

  • properties is a pointer to an array of XrApiLayerProperties structures, but can be NULL if propertyCapacityInput is 0.

  • See the Buffer Size Parameters section for a detailed description of retrieving the required properties size.

Description

The list of available layers may change at any time due to actions outside of the OpenXR runtime, so two calls to xrEnumerateApiLayerProperties with the same parameters may return different results, or retrieve different propertyCountOutput values or properties contents.

Once an instance has been created, the layers enabled for that instance will continue to be enabled and valid for the lifetime of that instance, even if some of them become unavailable for future instances.

Valid Usage (Implicit)
  • propertyCountOutput must be a pointer to a uint32_t value

  • If propertyCapacityInput is not 0, properties must be a pointer to an array of propertyCapacityInput XrApiLayerProperties structures

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateBoundSourcesForAction(3)

Name

xrEnumerateBoundSourcesForAction - Queries the bound input sources for an action

C Specification

The xrEnumerateBoundSourcesForAction function is defined as:

XrResult xrEnumerateBoundSourcesForAction(
    XrSession                                   session,
    const XrBoundSourcesForActionEnumerateInfo* enumerateInfo,
    uint32_t                                    sourceCapacityInput,
    uint32_t*                                   sourceCountOutput,
    XrPath*                                     sources);

Parameters

Parameter Descriptions
  • session is the XrSession being queried.

  • enumerateInfo is an XrBoundSourcesForActionEnumerateInfo providing the query information.

  • sourceCapacityInput is the capacity of the array, or 0 to indicate a request to retrieve the required capacity.

  • sourceCountOutput is a pointer to the count of sources, or a pointer to the required capacity in the case that sourceCapacityInput is 0.

  • sources is a pointer to an application-allocated array that will be filled with the XrPath values for all sources. It can be NULL if sourceCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required sources size.

Description

If an action is unbound, xrEnumerateBoundSourcesForAction must assign 0 to the value pointed-to by sourceCountOutput and not modify the array.

xrEnumerateBoundSourcesForAction must return XR_ERROR_ACTIONSET_NOT_ATTACHED if passed an action in an action set never attached to the session with xrAttachSessionActionSets.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • enumerateInfo must be a pointer to a valid XrBoundSourcesForActionEnumerateInfo structure

  • sourceCountOutput must be a pointer to a uint32_t value

  • If sourceCapacityInput is not 0, sources must be a pointer to an array of sourceCapacityInput XrPath values

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateEnvironmentBlendModes(3)

Name

xrEnumerateEnvironmentBlendModes - Lists environment blend modes

C Specification

The xrEnumerateEnvironmentBlendModes function is defined as:

XrResult xrEnumerateEnvironmentBlendModes(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrViewConfigurationType                     viewConfigurationType,
    uint32_t                                    environmentBlendModeCapacityInput,
    uint32_t*                                   environmentBlendModeCountOutput,
    XrEnvironmentBlendMode*                     environmentBlendModes);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose environment blend modes will be enumerated.

  • viewConfigurationType is the XrViewConfigurationType to enumerate.

  • environmentBlendModeCapacityInput is the capacity of the environmentBlendModes array, or 0 to indicate a request to retrieve the required capacity.

  • environmentBlendModeCountOutput is a pointer to the count of environmentBlendModes written, or a pointer to the required capacity in the case that environmentBlendModeCapacityInput is 0.

  • environmentBlendModes is a pointer to an array of XrEnvironmentBlendMode values, but can be NULL if environmentBlendModeCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required environmentBlendModes size.

Description

Enumerates the set of environment blend modes that this runtime supports for a given view configuration of the system. Environment blend modes should be in order from highest to lowest runtime preference.

Runtimes must always return identical buffer contents from this enumeration for the given systemId and viewConfigurationType for the lifetime of the instance.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • viewConfigurationType must be a valid XrViewConfigurationType value

  • environmentBlendModeCountOutput must be a pointer to a uint32_t value

  • If environmentBlendModeCapacityInput is not 0, environmentBlendModes must be a pointer to an array of environmentBlendModeCapacityInput XrEnvironmentBlendMode values

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

  • XR_ERROR_SIZE_INSUFFICIENT

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateInstanceExtensionProperties(3)

Name

xrEnumerateInstanceExtensionProperties - Returns properties of available instance extensions

C Specification

The application can determine the available instance extensions by calling xrEnumerateInstanceExtensionProperties:

XrResult xrEnumerateInstanceExtensionProperties(
    const char*                                 layerName,
    uint32_t                                    propertyCapacityInput,
    uint32_t*                                   propertyCountOutput,
    XrExtensionProperties*                      properties);

Parameters

Parameter Descriptions
  • layerName is either NULL or a pointer to a string naming the API layer to retrieve extensions from, as returned by xrEnumerateApiLayerProperties.

  • propertyCapacityInput is the capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.

  • propertyCountOutput is a pointer to the count of properties written, or a pointer to the required capacity in the case that propertyCapacityInput is 0.

  • properties is a pointer to an array of XrExtensionProperties structures, but can be NULL if propertyCapacityInput is 0.

  • See the Buffer Size Parameters section for a detailed description of retrieving the required properties size.

Description

If properties is NULL, then the number of extensions properties available is returned in propertyCountOutput. Otherwise, propertyCountInput must point to a variable set by the user to the number of elements in the properties array. If propertyCountInput is less than the number of extension properties available, the contents of properties will be undefined. If propertyCountInput is smaller than the number of extensions available, the runtime must return the failure code XR_ERROR_SIZE_INSUFFICIENT and the contents of properties are undefined.

Because the list of available layers may change externally between calls to xrEnumerateInstanceExtensionProperties, two calls may retrieve different results if a layerName is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.

Valid Usage (Implicit)
  • If layerName is not NULL, layerName must be a null-terminated UTF-8 string

  • propertyCountOutput must be a pointer to a uint32_t value

  • If propertyCapacityInput is not 0, properties must be a pointer to an array of propertyCapacityInput XrExtensionProperties structures

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_API_LAYER_NOT_PRESENT

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateReferenceSpaces(3)

Name

xrEnumerateReferenceSpaces - Enumerate available reference spaces

C Specification

The xrEnumerateReferenceSpaces function is defined as:

XrResult xrEnumerateReferenceSpaces(
    XrSession                                   session,
    uint32_t                                    spaceCapacityInput,
    uint32_t*                                   spaceCountOutput,
    XrReferenceSpaceType*                       spaces);

Parameters

Parameter Descriptions
  • session is a handle to an XrSession previously created with xrCreateSession.

  • spaceCapacityInput is the capacity of the spaces array, or 0 to indicate a request to retrieve the required capacity.

  • spaceCountOutput is a pointer to the count of spaces written, or a pointer to the required capacity in the case that spaceCapacityInput is 0.

  • spaces is a pointer to an application-allocated array that will be filled with the enumerant of each supported reference space. It can be NULL if spaceCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required spaces size.

Description

Enumerates the set of reference space types that this runtime supports for a given session. Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.

If a session enumerates support for a given reference space type, calls to xrCreateReferenceSpace must succeed for that session, with any transient unavailability of poses expressed later during calls to xrLocateSpace.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • spaceCountOutput must be a pointer to a uint32_t value

  • If spaceCapacityInput is not 0, spaces must be a pointer to an array of spaceCapacityInput XrReferenceSpaceType values

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateSwapchainFormats(3)

Name

xrEnumerateSwapchainFormats - Enumerates swapchain formats

C Specification

The xrEnumerateSwapchainFormats function is defined as:

XrResult xrEnumerateSwapchainFormats(
    XrSession                                   session,
    uint32_t                                    formatCapacityInput,
    uint32_t*                                   formatCountOutput,
    int64_t*                                    formats);

Parameters

Parameter Descriptions
  • session is the session that enumerates the supported formats.

  • formatCapacityInput is the capacity of the formats, or 0 to retrieve the required capacity.

  • formatCountOutput is a pointer to the count of uint64_t formats written, or a pointer to the required capacity in the case that formatCapacityInput is 0.

  • formats is a pointer to an array of int64_t format ids, but can be NULL if formatCapacityInput is 0. The format ids are specific to the specified graphics API.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required formats size.

Description

xrEnumerateSwapchainFormats enumerates the texture formats supported by the current session. The type of formats returned are dependent on the graphics API specified in xrCreateSession. For example, if a DirectX graphics API was specified, then the enumerated formats correspond to the DXGI formats, such as DXGI_FORMAT_R8G8B8A8_UNORM_SRGB. Texture formats should be in order from highest to lowest runtime preference.

With an OpenGL-based graphics API, the texture formats correspond to OpenGL internal formats.

With a Direct3D-based graphics API, xrEnumerateSwapchainFormats never returns typeless formats (e.g. DXGI_FORMAT_R8G8B8A8_TYPELESS). Only concrete formats are returned, and only concrete formats may be specified by applications for swapchain creation.

Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • formatCountOutput must be a pointer to a uint32_t value

  • If formatCapacityInput is not 0, formats must be a pointer to an array of formatCapacityInput int64_t values

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateSwapchainImages(3)

Name

xrEnumerateSwapchainImages - Gets images from an XrSwapchain

C Specification

The xrEnumerateSwapchainImages function is defined as:

XrResult xrEnumerateSwapchainImages(
    XrSwapchain                                 swapchain,
    uint32_t                                    imageCapacityInput,
    uint32_t*                                   imageCountOutput,
    XrSwapchainImageBaseHeader*                 images);

Parameters

Parameter Descriptions
  • swapchain is the XrSwapchain to get images from.

  • imageCapacityInput is the capacity of the images array, or 0 to indicate a request to retrieve the required capacity.

  • imageCountOutput is a pointer to the count of images written, or a pointer to the required capacity in the case that imageCapacityInput is 0.

  • images is a pointer to an array of graphics API-specific XrSwapchainImage structures based off of XrSwapchainImageBaseHeader. It can be NULL if imageCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required images size.

Description

Fills an array of graphics API-specific XrSwapchainImage structures. The resources must be constant and valid for the lifetime of the XrSwapchain.

Runtimes must always return identical buffer contents from this enumeration for the lifetime of the swapchain.

Note: images is a pointer to an array of structures of graphics API-specific type, not an array of structure pointers.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateViewConfigurationViews(3)

Name

xrEnumerateViewConfigurationViews - Gets view configuration views

C Specification

The xrEnumerateViewConfigurationViews function is defined as:

XrResult xrEnumerateViewConfigurationViews(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrViewConfigurationType                     viewConfigurationType,
    uint32_t                                    viewCapacityInput,
    uint32_t*                                   viewCountOutput,
    XrViewConfigurationView*                    views);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose view configuration is being queried.

  • viewConfigurationType is the XrViewConfigurationType of the configuration to get.

  • viewCapacityInput is the capacity of the views array, or 0 to indicate a request to retrieve the required capacity.

  • viewCountOutput is a pointer to the count of views written, or a pointer to the required capacity in the case that viewCapacityInput is 0.

  • views is a pointer to an array of XrViewConfigurationView values, but can be NULL if viewCapacityInput is 0.

Description

Each XrViewConfigurationType defines the number of views associated with it. Applications can query more details of each view element using xrEnumerateViewConfigurationViews. If the supplied viewConfigurationType is not supported by this XrInstance and XrSystemId, the runtime must return XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.

Runtimes must always return identical buffer contents from this enumeration for the given systemId and viewConfigurationType for the lifetime of the instance.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • viewConfigurationType must be a valid XrViewConfigurationType value

  • viewCountOutput must be a pointer to a uint32_t value

  • If viewCapacityInput is not 0, views must be a pointer to an array of viewCapacityInput XrViewConfigurationView structures

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

  • XR_ERROR_SIZE_INSUFFICIENT

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrEnumerateViewConfigurations(3)

Name

xrEnumerateViewConfigurations - Enumerates supported view configurations

C Specification

The xrEnumerateViewConfigurations function is defined as:

XrResult xrEnumerateViewConfigurations(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    uint32_t                                    viewConfigurationTypeCapacityInput,
    uint32_t*                                   viewConfigurationTypeCountOutput,
    XrViewConfigurationType*                    viewConfigurationTypes);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose view configurations will be enumerated.

  • viewConfigurationsTypeCapacityInput is the capacity of the viewConfigurations array, or 0 to indicate a request to retrieve the required capacity.

  • viewConfigurationsTypeCountOutput is a pointer to the count of viewConfigurations written, or a pointer to the required capacity in the case that viewConfigurationsTypeCapacityInput is 0.

  • viewConfigurationsTypes is a pointer to an array of XrViewConfigurationType values, but can be NULL if viewConfigurationsTypeCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required viewConfigurations size.

Description

xrEnumerateViewConfigurations enumerates the view configuration types supported by the XrSystemId. The supported set for that system must not change during the lifetime of its XrInstance. The returned list of primary view configurations should be in order from what the runtime considered highest to lowest user preference. Thus the first enumerated view configuration type should be the one the runtime prefers the application to use if possible.

Runtimes must always return identical buffer contents from this enumeration for the given systemId and for the lifetime of the instance.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • viewConfigurationTypeCountOutput must be a pointer to a uint32_t value

  • If viewConfigurationTypeCapacityInput is not 0, viewConfigurationTypes must be a pointer to an array of viewConfigurationTypeCapacityInput XrViewConfigurationType values

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetActionStateBoolean(3)

Name

xrGetActionStateBoolean - Gets boolean action state

C Specification

xrGetActionStateBoolean retrieves the current state of a boolean action. It is defined as:

XrResult xrGetActionStateBoolean(
    XrSession                                   session,
    const XrActionStateGetInfo*                 getInfo,
    XrActionStateBoolean*                       state);

Parameters

Parameter Descriptions

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetActionStateFloat(3)

Name

xrGetActionStateFloat - Gets a floating point action state

C Specification

xrGetActionStateFloat retrieves the current state of a floating-point action. It is defined as:

XrResult xrGetActionStateFloat(
    XrSession                                   session,
    const XrActionStateGetInfo*                 getInfo,
    XrActionStateFloat*                         state);

Parameters

Parameter Descriptions

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetActionStatePose(3)

Name

xrGetActionStatePose - Gets metadata from a pose action

C Specification

The xrGetActionStatePose function is defined as:

XrResult xrGetActionStatePose(
    XrSession                                   session,
    const XrActionStateGetInfo*                 getInfo,
    XrActionStatePose*                          state);

Parameters

Parameter Descriptions

Description

xrGetActionStatePose returns information about the binding and active state for the specified action. To determine the pose of this action at a historical or predicted time, the application can create an action space using xrCreateActionSpace. Then, after each sync, the application can locate the pose of this action space within a base space using xrLocateSpace.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetActionStateVector2f(3)

Name

xrGetActionStateVector2f - Gets 2D float vector action state

C Specification

xrGetActionStateVector2f retrieves the current state of a two-dimensional vector action. It is defined as:

XrResult xrGetActionStateVector2f(
    XrSession                                   session,
    const XrActionStateGetInfo*                 getInfo,
    XrActionStateVector2f*                      state);

Parameters

Parameter Descriptions

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetCurrentInteractionProfile(3)

Name

xrGetCurrentInteractionProfile - Gets the current interaction profile for a top level user paths

C Specification

The xrGetCurrentInteractionProfile function is defined as:

XrResult xrGetCurrentInteractionProfile(
    XrSession                                   session,
    XrPath                                      topLevelUserPath,
    XrInteractionProfileState*                  interactionProfile);

Parameters

Parameter Descriptions
  • session is the XrSession for which the application would like to retrieve the current interaction profile.

  • topLevelUserPath is the top level user path the application would like to retrieve the interaction profile for.

  • interactionProfile is a pointer to an XrInteractionProfileState structure to receive the current interaction profile.

Description

xrGetCurrentInteractionProfile asks the runtime for the active interaction profiles for a top level user path.

The runtime must return only interaction profiles for which the application has provided bindings with xrSuggestInteractionProfileBindings. The runtime may return interaction profiles that do not represent physically present hardware, for example if the runtime is using a known interaction profile to bind to hardware that the application is not aware of. The runtime may return the last-known interaction profile in the event that no controllers are active.

If xrAttachSessionActionSets has not yet been called for the session, the runtime must return XR_ERROR_ACTIONSET_NOT_ATTACHED. If topLevelUserPath does not follow the format defined in Device input subpaths, the runtime must return XR_ERROR_PATH_UNSUPPORTED.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_UNSUPPORTED

  • XR_ERROR_PATH_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetD3D11GraphicsRequirementsKHR(3)

Name

xrGetD3D11GraphicsRequirementsKHR - Retrieve the D3D11 feature level and graphics device requirements for an instance and system

C Specification

To retrieve the D3D11 feature level and graphics device for an instance and system, call:

XrResult xrGetD3D11GraphicsRequirementsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrGraphicsRequirementsD3D11KHR*             graphicsRequirements);

Parameters

Parameter Descriptions

Description

The xrGetD3D11GraphicsRequirementsKHR function identifies to the application what graphics device (Windows LUID) needs to be used and the minimum feature level to use. xrGetD3D11GraphicsRequirementsKHR must be called prior to calling xrCreateSession, and the LUID and feature level that xrGetD3D11GraphicsRequirementsKHR returns should be used to create the ID3D11Device that the application passes to xrCreateSession in the XrGraphicsBindingD3D11KHR.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetD3D12GraphicsRequirementsKHR(3)

Name

xrGetD3D12GraphicsRequirementsKHR - Retrieve the D3D12 feature level and graphics device requirements for an instance and system

C Specification

To retrieve the D3D12 feature level and graphics device for an instance and system, call:

XrResult xrGetD3D12GraphicsRequirementsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrGraphicsRequirementsD3D12KHR*             graphicsRequirements);

Parameters

Parameter Descriptions

Description

The xrGetD3D12GraphicsRequirementsKHR function identifies to the application what graphics device (Windows LUID) needs to be used and the minimum feature level to use. xrGetD3D12GraphicsRequirementsKHR must be called prior to calling xrCreateSession, and the LUID and feature level that xrGetD3D12GraphicsRequirementsKHR returns should be used to create the ID3D12Device that the application passes to xrCreateSession in the XrGraphicsBindingD3D12KHR.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetInputSourceLocalizedName(3)

Name

xrGetInputSourceLocalizedName - Gets a localized source name

C Specification

The xrGetInputSourceLocalizedName function is defined as:

XrResult xrGetInputSourceLocalizedName(
    XrSession                                   session,
    const XrInputSourceLocalizedNameGetInfo*    getInfo,
    uint32_t                                    bufferCapacityInput,
    uint32_t*                                   bufferCountOutput,
    char*                                       buffer);

Parameters

Parameter Descriptions
  • session is a handle to the XrSession associated with the action that reported this source.

  • getInfo is an XrInputSourceLocalizedNameGetInfo providing the query information.

  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.

  • bufferCountOutput is a pointer to the count of name characters written (including the terminating \0), or a pointer to the required capacity in the case that bufferCapacityInput is 0.

  • buffer is a pointer to an application-allocated buffer that will be filled with the source name. It can be NULL if bufferCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

xrGetInputSourceLocalizedName returns a string for the input source in the current system locale.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • getInfo must be a pointer to a valid XrInputSourceLocalizedNameGetInfo structure

  • bufferCountOutput must be a pointer to a uint32_t value

  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput char values

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetInstanceProcAddr(3)

Name

xrGetInstanceProcAddr - Gets a function pointer for an OpenXR function

C Specification

Function pointers for all OpenXR functions can be obtained with the function xrGetInstanceProcAddr.

XrResult xrGetInstanceProcAddr(
    XrInstance                                  instance,
    const char*                                 name,
    PFN_xrVoidFunction*                         function);

Parameters

Parameter Descriptions
  • instance is the instance that the function pointer will be compatible with, or NULL for functions not dependent on any instance.

  • name is the name of the function to obtain.

  • function is the address of the function pointer to get.

Description

xrGetInstanceProcAddr itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this function as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs. Loaders must export function symbols for all core OpenXR functions. Because of this, applications that use only the core OpenXR functions have no need to use xrGetInstanceProcAddr.

Because an application can call xrGetInstanceProcAddr before creating an instance, xrGetInstanceProcAddr returns a valid function pointer when the instance parameter is XR_NULL_HANDLE and the name parameter is one of the following strings:

xrGetInstanceProcAddr must return XR_ERROR_HANDLE_INVALID if name is not one of the above strings and instance is XR_NULL_HANDLE. xrGetInstanceProcAddr may return XR_ERROR_HANDLE_INVALID if name is not one of the above strings and instance is invalid but not XR_NULL_HANDLE.

xrGetInstanceProcAddr must return XR_ERROR_FUNCTION_UNSUPPORTED if instance is a valid instance and the string specified in name is not the name of an OpenXR core or enabled extension function.

If name is the name of an extension function, then the result returned by xrGetInstanceProcAddr will depend upon how the instance was created. If instance was created with the related extension’s name appearing in the XrInstanceCreateInfo::enabledExtensionNames array, then xrGetInstanceProcAddr returns a valid function pointer. If the related extension’s name did not appear in the XrInstanceCreateInfo::enabledExtensionNames array during the creation of instance, then xrGetInstanceProcAddr returns XR_ERROR_FUNCTION_UNSUPPORTED. Because of this, function pointers returned by xrGetInstanceProcAddr using one XrInstance may not be valid when used with objects related to a different XrInstance.

The returned function pointer is of type PFN_xrVoidFunction, and must be cast to the type of the function being queried.

The table below defines the various use cases for xrGetInstanceProcAddr and return value (“fp” is “function pointer”) for each case.

Table 1. xrGetInstanceProcAddr behavior
instance parameter name parameter return value

*

NULL

undefined

invalid instance

*

undefined

NULL

xrEnumerateInstanceExtensionProperties

fp

NULL

xrEnumerateApiLayerProperties

fp

NULL

xrCreateInstance

fp

NULL

* (any name not covered above)

NULL

instance

core OpenXR function

fp1

instance

enabled extension function for instance

fp1

instance

* (any name not covered above)

NULL

1

The returned function pointer must only be called with a handle (the first parameter) that is instance or a child of instance.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetInstanceProperties(3)

Name

xrGetInstanceProperties - Gets information about the instance

C Specification

The xrGetInstanceProperties function provides information about the instance and the associated runtime.

XrResult xrGetInstanceProperties(
    XrInstance                                  instance,
    XrInstanceProperties*                       instanceProperties);

Parameters

Parameter Descriptions

Description

The instanceProperties parameter must be filled out by the runtime in response to this call, with information as defined in XrInstanceProperties.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetOpenGLESGraphicsRequirementsKHR(3)

Name

xrGetOpenGLESGraphicsRequirementsKHR - Retrieve the OpenGL ES version requirements for an instance and system

C Specification

To query OpenGL ES API version requirements for an instance and system, call:

XrResult xrGetOpenGLESGraphicsRequirementsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrGraphicsRequirementsOpenGLESKHR*          graphicsRequirements);

Parameters

Parameter Descriptions

Description

The xrGetOpenGLESGraphicsRequirementsKHR function identifies to the application the minimum OpenGL ES version requirement and the highest known tested OpenGL ES version. xrGetOpenGLESGraphicsRequirementsKHR must be called prior to calling xrCreateSession.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetOpenGLGraphicsRequirementsKHR(3)

Name

xrGetOpenGLGraphicsRequirementsKHR - Retrieve the OpenGL version requirements for an instance and system

C Specification

To query OpenGL API version requirements for an instance and system, call:

XrResult xrGetOpenGLGraphicsRequirementsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrGraphicsRequirementsOpenGLKHR*            graphicsRequirements);

Parameters

Parameter Descriptions

Description

The xrGetOpenGLGraphicsRequirementsKHR function identifies to the application the minimum OpenGL version requirement and the highest known tested OpenGL version. xrGetOpenGLGraphicsRequirementsKHR must be called prior to calling xrCreateSession.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetReferenceSpaceBoundsRect(3)

Name

xrGetReferenceSpaceBoundsRect - Gets the bounds rectangle of a reference space

C Specification

XR systems may have limited real world spatial ranges in which users can freely move around while remaining tracked. Applications may wish to query these boundaries and alter application behavior or content placement to ensure the user can complete the experience while remaining within the boundary. Applications can query this information using xrGetReferenceSpaceBoundsRect.

When called, xrGetReferenceSpaceBoundsRect should return the extents of a rectangle that is clear of obstacles down to the floor, allowing where the user can freely move while remaining tracked, if available for that reference space. The returned extent represents the dimensions of an axis-aligned bounding box where the XrExtent2Df::width and XrExtent2Df::height fields correspond to the X and Z axes of the provided space, with the extents centered at the origin of the space. Not all systems or spaces may support boundaries. If a runtime is unable to provide bounds for a given space, XR_SPACE_BOUNDS_UNAVAILABLE will be returned and all fields of bounds will be set to 0.

The returned extents are expressed relative to the natural origin of the provided XrReferenceSpaceType and must not incorporate any origin offsets specified by the application during calls to xrCreateReferenceSpace.

The runtime must return XR_ERROR_REFERENCE_SPACE_UNSUPPORTED if the XrReferenceSpaceType passed in createInfo is not supported by this session.

When a runtime will begin operating with updated space bounds, the runtime must queue a corresponding XrEventDataReferenceSpaceChangePending event.

XrResult xrGetReferenceSpaceBoundsRect(
    XrSession                                   session,
    XrReferenceSpaceType                        referenceSpaceType,
    XrExtent2Df*                                bounds);

Parameters

Parameter Descriptions
  • type is the XrStructureType of this structure.

  • session is a handle to an XrSession previously created with xrCreateSession.

  • referenceSpaceType is the reference space type whose bounds should be retrieved.

  • bounds is the returned space extents.

Description

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

  • XR_SPACE_BOUNDS_UNAVAILABLE

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_REFERENCE_SPACE_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetSystem(3)

Name

xrGetSystem - Gets a system identifier

C Specification

The xrGetSystem function is defined as:

XrResult xrGetSystem(
    XrInstance                                  instance,
    const XrSystemGetInfo*                      getInfo,
    XrSystemId*                                 systemId);

Parameters

Parameter Descriptions
  • instance is the handle of the instance from which to get the information.

  • getInfo is a pointer to an XrSystemGetInfo structure containing the application’s requests for a system.

  • systemId is the returned XrSystemId.

Description

To get an XrSystemId, an application specifies its desired form factor to xrGetSystem and gets the runtime’s XrSystemId associated with that configuration.

If the form factor is supported but temporarily unavailable, xrGetSystem must return XR_ERROR_FORM_FACTOR_UNAVAILABLE. A runtime may return XR_SUCCESS on a subsequent call for a form factor it previously returned XR_ERROR_FORM_FACTOR_UNAVAILABLE. For example, connecting or warming up hardware might cause an unavailable form factor to become available.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FORM_FACTOR_UNAVAILABLE

  • XR_ERROR_FORM_FACTOR_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetSystemProperties(3)

Name

xrGetSystemProperties - Gets the properties of a particular system

C Specification

The xrGetSystemProperties function is defined as:

XrResult xrGetSystemProperties(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrSystemProperties*                         properties);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose properties will be queried.

  • properties points to an instance of the XrSystemProperties structure, that will be filled with returned information.

Description

An application can call xrGetSystemProperties to retrieve information about the system such as vendor ID, system name, and graphics and tracking properties.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetViewConfigurationProperties(3)

Name

xrGetViewConfigurationProperties - Gets information for a view configuration

C Specification

The xrGetViewConfigurationProperties function is defined as:

XrResult xrGetViewConfigurationProperties(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrViewConfigurationType                     viewConfigurationType,
    XrViewConfigurationProperties*              configurationProperties);

Parameters

Parameter Descriptions
  • instance is the instance from which systemId was retrieved.

  • systemId is the XrSystemId whose view configuration is being queried.

  • viewConfigurationType is the XrViewConfigurationType of the configuration to get.

  • configurationProperties is a pointer to view configuration properties to return.

Description

xrGetViewConfigurationProperties queries properties of an individual view configuration. Applications must use one of the supported view configuration types returned by xrEnumerateViewConfigurations. If viewConfigurationType is not supported by this XrInstance the runtime must return XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetVisibilityMaskKHR(3)

Name

xrGetVisibilityMaskKHR - Gets visibility mask

C Specification

The xrGetVisibilityMaskKHR function is defined as:

XrResult xrGetVisibilityMaskKHR(
    XrSession                                   session,
    XrViewConfigurationType                     viewConfigurationType,
    uint32_t                                    viewIndex,
    XrVisibilityMaskTypeKHR                     visibilityMaskType,
    XrVisibilityMaskKHR*                        visibilityMask);

Parameters

Parameter Descriptions
  • session is an XrSession handle previously created with xrCreateSession.

  • viewConfigurationType is the view configuration from which to retrieve mask information.

  • viewIndex is the individual view within the view configuration from which to retrieve mask information.

  • visibilityMaskType is the type of visibility mask requested.

  • visibilityMask is an input/output struct which specifies the view mask.

Description

xrGetVisibilityMaskKHR retrieves the view mask for a given view. This function follows the two-call idiom for filling multiple buffers in a struct. Specifically, if either vertexCapacityInput or indexCapacityInput is 0, the runtime must respond as if both fields were set to 0, returning the vertex count and index count through vertexCountOutput or indexCountOutput respectively. If a view mask for the specified view isn’t available, the returned vertex and index counts must be 0.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetVulkanDeviceExtensionsKHR(3)

Name

xrGetVulkanDeviceExtensionsKHR - Get list of required Vulkan device extensions for an OpenXR instance and system

C Specification

XrResult xrGetVulkanDeviceExtensionsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    uint32_t                                    bufferCapacityInput,
    uint32_t*                                   bufferCountOutput,
    char*                                       buffer);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • systemId is an XrSystemId handle for the system which will be used to create a session.

  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.

  • bufferCountOutput is a pointer to the count of characters written (including terminating \0), or a pointer to the required capacity in the case that bufferCapacityInput is 0.

  • buffer is a pointer to an array of characters, but can be NULL if bufferCapacityInput is 0. The format of the output is a single space (ASCII 0x20) delimited string of extension names.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

Valid Usage (Implicit)
  • The [XR_KHR_vulkan_enable] extension must be enabled prior to calling xrGetVulkanDeviceExtensionsKHR

  • instance must be a valid XrInstance handle

  • bufferCountOutput must be a pointer to a uint32_t value

  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput null-terminated UTF-8 strings

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetVulkanGraphicsDeviceKHR(3)

Name

xrGetVulkanGraphicsDeviceKHR - Retrieve the Vulkan physical device associated with an OpenXR instance and system

C Specification

To identify what graphics device needs to be used for an instance and system, call:

XrResult xrGetVulkanGraphicsDeviceKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    VkInstance                                  vkInstance,
    VkPhysicalDevice*                           vkPhysicalDevice);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • systemId is an XrSystemId handle for the system which will be used to create a session.

  • vkInstance is a valid Vulkan VkInstance.

  • vkPhysicalDevice is a pointer to a VkPhysicalDevice value to populate.

Description

xrGetVulkanGraphicsDeviceKHR function identifies to the application what graphics device (Vulkan VkPhysicalDevice) needs to be used. xrGetVulkanGraphicsDeviceKHR must be called prior to calling xrCreateSession, and the VkPhysicalDevice that xrGetVulkanGraphicsDeviceKHR returns should be passed to xrCreateSession in the XrGraphicsBindingVulkanKHR.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetVulkanGraphicsRequirementsKHR(3)

Name

xrGetVulkanGraphicsRequirementsKHR - Retrieve the Vulkan version requirements for an instance and system

C Specification

To query Vulkan API version requirements, call:

XrResult xrGetVulkanGraphicsRequirementsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    XrGraphicsRequirementsVulkanKHR*            graphicsRequirements);

Parameters

Parameter Descriptions

Description

The xrGetVulkanGraphicsRequirementsKHR function identifies to the application the minimum Vulkan version requirement and the highest known tested Vulkan version. xrGetVulkanGraphicsRequirementsKHR must be called prior to calling xrCreateSession.

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrGetVulkanInstanceExtensionsKHR(3)

Name

xrGetVulkanInstanceExtensionsKHR - Get list of required Vulkan instance extensions for an OpenXR instance and system

C Specification

XrResult xrGetVulkanInstanceExtensionsKHR(
    XrInstance                                  instance,
    XrSystemId                                  systemId,
    uint32_t                                    bufferCapacityInput,
    uint32_t*                                   bufferCountOutput,
    char*                                       buffer);

Parameters

Parameter Descriptions
  • instance is an XrInstance handle previously created with xrCreateInstance.

  • systemId is an XrSystemId handle for the system which will be used to create a session.

  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.

  • bufferCountOutput is a pointer to the count of characters written (including terminating \0), or a pointer to the required capacity in the case that bufferCapacityInput is 0.

  • buffer is a pointer to an array of characters, but can be NULL if bufferCapacityInput is 0. The format of the output is a single space (ASCII 0x20) delimited string of extension names.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

The xrGetVulkanGraphicsDeviceKHR function identifies to the application what graphics device (Vulkan VkPhysicalDevice) needs to be used. xrGetVulkanGraphicsDeviceKHR must be called prior to calling xrCreateSession, and the VkPhysicalDevice that xrGetVulkanGraphicsDeviceKHR returns should be passed to xrCreateSession.

Valid Usage (Implicit)
  • The [XR_KHR_vulkan_enable] extension must be enabled prior to calling xrGetVulkanInstanceExtensionsKHR

  • instance must be a valid XrInstance handle

  • bufferCountOutput must be a pointer to a uint32_t value

  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput null-terminated UTF-8 strings

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SYSTEM_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrLocateSpace(3)

Name

xrLocateSpace - Locates a space with reference to another space

C Specification

xrLocateSpace provides the physical location of a space in a base space at a specified time, if currently known by the runtime.

XrResult xrLocateSpace(
    XrSpace                                     space,
    XrSpace                                     baseSpace,
    XrTime                                      time,
    XrSpaceLocation*                            location);

Parameters

Parameter Descriptions
  • space identifies the target space to locate.

  • baseSpace identifies the underlying space in which to locate space.

  • time is the time for which the location should be provided.

  • location provides the location of space in baseSpace.

Description

For a time in the past, the runtime should locate the spaces based on the runtime’s most accurate current understanding of how the world was at that historical time.

For a time in the future, the runtime should locate the spaces based on the runtime’s most up-to-date prediction of how the world will be at that future time.

The minimum valid range of values for time are described in https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#prediction-time-limits. For values of time outside this range, xrLocateSpace may return a location with no position and XR_SPACE_LOCATION_POSITION_VALID_BIT unset.

Some devices improve their understanding of the world as the device is used. The location returned by xrLocateSpace for a given space, baseSpace and time may change over time, even for spaces that track static objects, as one or both spaces adjust their origins.

During tracking loss of space relative to baseSpace, runtimes should continue to provide inferred or last-known position and orientation values. These inferred poses can, for example, be based on neck model updates, inertial dead reckoning, or a last-known position, so long as it is still reasonable for the application to use that pose. While a runtime is providing position data, it must continue to set XR_SPACE_LOCATION_POSITION_VALID_BIT but it can clear XR_SPACE_LOCATION_POSITION_TRACKED_BIT to indicate that the position is inferred or last-known in this way.

If the runtime has not yet observed even a last-known pose for how to locate space in baseSpace (e.g. one space is an action space bound to a motion controller that has not yet been detected, or the two spaces are in disconnected fragments of the runtime’s tracked volume), the runtime should return a location with no position and XR_SPACE_LOCATION_POSITION_VALID_BIT unset.

The runtime must return a location with both XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_SPACE_LOCATION_POSITION_TRACKED_BIT set when locating space and baseSpace if both spaces were created relative to the same entity (e.g. two action spaces for the same action), even if the entity is currently untracked. The location in this case is the difference in the two spaces' application-specified transforms relative to that common entity.

The runtime should return a location with XR_SPACE_LOCATION_POSITION_VALID_BIT set and XR_SPACE_LOCATION_POSITION_TRACKED_BIT unset for spaces tracking two static entities in the world when their relative pose is known to the runtime. This enables applications to make use of the runtime’s latest knowledge of the world, even during tracking loss.

If an XrSpaceVelocity structure is chained to the next pointer of XrSpaceLocation, the runtime should fill in the linear and angular velocity of the origin of space within the reference frame of baseSpace. If the runtime provides linear velocity or angular velocity, it must set XR_SPACE_VELOCITY_LINEAR_VALID_BIT or XR_SPACE_VELOCITY_ANGULAR_VALID_BIT, respectively.

The following example code shows how an application can get both the location and velocity of a space within a base space using the xrLocateSpace function by chaining an XrSpaceVelocity to the next pointer of XrSpaceLocation and calling xrLocateSpace.

XrSpace space;      // previously initialized
XrSpace baseSpace;  // previously initialized
XrTime time;        // previously initialized

XrSpaceVelocity velocity {XR_TYPE_SPACE_VELOCITY};
XrSpaceLocation location {XR_TYPE_SPACE_LOCATION, &velocity};
xrLocateSpace(space, baseSpace, time, &location);
Valid Usage (Implicit)
  • space must be a valid XrSpace handle

  • baseSpace must be a valid XrSpace handle

  • location must be a pointer to an XrSpaceLocation structure

  • Both of baseSpace and space must have been created, allocated, or retrieved from the same XrSession

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_TIME_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrLocateViews(3)

Name

xrLocateViews - Gets view and projection info

C Specification

The xrLocateViews function is defined as:

XrResult xrLocateViews(
    XrSession                                   session,
    const XrViewLocateInfo*                     viewLocateInfo,
    XrViewState*                                viewState,
    uint32_t                                    viewCapacityInput,
    uint32_t*                                   viewCountOutput,
    XrView*                                     views);

Parameters

Parameter Descriptions
  • session is a handle to the provided XrSession.

  • viewLocateInfo is a pointer to a valid XrViewLocateInfo structure.

  • viewState is the output structure with the viewer state information.

  • viewCapacityInput is an input parameter which specifies the capacity of the views array. The required capacity must be same as defined by the corresponding XrViewConfigurationType.

  • viewCountOutput is an output parameter which identifies the valid count of views.

  • views is an array of XrView.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required views size.

Description

The xrLocateViews function returns the view and projection info for a particular display time. This time is typically the target display time for a given frame. Repeatedly calling xrLocateViews with the same time may not necessarily return the same result. Instead the prediction gets increasingly accurate as the function is called closer to the given time for which a prediction is made. This allows an application to get the predicted views as late as possible in its pipeline to get the least amount of latency and prediction error.

xrLocateViews returns an array of XrView elements, one for each view of the specified view configuration type, along with an XrViewState containing additional state data shared across all views. The eye each view corresponds to is statically defined in XrViewConfigurationType in case the application wants to apply eye-specific rendering traits. The XrViewState and XrView member data may change on subsequent calls to xrLocateViews, and so applications must not assume it to be constant.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • viewLocateInfo must be a pointer to a valid XrViewLocateInfo structure

  • viewState must be a pointer to an XrViewState structure

  • viewCountOutput must be a pointer to a uint32_t value

  • If viewCapacityInput is not 0, views must be a pointer to an array of viewCapacityInput XrView structures

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

  • XR_ERROR_TIME_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrPathToString(3)

Name

xrPathToString - Converts a semantic path to a string

C Specification

XrResult xrPathToString(
    XrInstance                                  instance,
    XrPath                                      path,
    uint32_t                                    bufferCapacityInput,
    uint32_t*                                   bufferCountOutput,
    char*                                       buffer);

Parameters

Parameter Descriptions
  • instance is an instance previously created.

  • path is the valid XrPath value to retrieve the path string for.

  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.

  • bufferCountOutput is a pointer to the count of characters written (including the terminating '\0'), or a pointer to the required capacity in the case that bufferCapacityInput is 0.

  • buffer is a pointer to an application-allocated buffer that will be filled with the semantic path string. It can be NULL if bufferCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

xrPathToString retrieves the path name string associated with an XrPath, in the context of a given XrInstance, in the form of a NULL terminated string placed into a caller-allocated buffer. Since the mapping between a well-formed path name string and an XrPath is bijective, there will always be exactly one string for each valid XrPath value. This can be useful if the calling application receives an XrPath value that they had not previously retrieved via xrStringToPath. During the lifetime of the given XrInstance, the path name string retrieved by this function for a given valid XrPath will not change. For invalid paths, including XR_NULL_PATH, XR_ERROR_PATH_INVALID must be returned.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • bufferCountOutput must be a pointer to a uint32_t value

  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput char values

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_SIZE_INSUFFICIENT

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrPerfSettingsSetPerformanceLevelEXT(3)

Name

xrPerfSettingsSetPerformanceLevelEXT - xrPerfSettingsSetPerformanceLevelEXT

C Specification

XrResult xrPerfSettingsSetPerformanceLevelEXT(
    XrSession                                   session,
    XrPerfSettingsDomainEXT                     domain,
    XrPerfSettingsLevelEXT                      level);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • domain: the processing domain for which the level hint is applied

  • level: the level hint to be applied

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_SESSION_LOST

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrPollEvent(3)

Name

xrPollEvent - Polls for events

C Specification

XrResult xrPollEvent(
    XrInstance                                  instance,
    XrEventDataBuffer*                          eventData);

Parameters

xrPollEvent polls for the next event and returns an event if one is available. xrPollEvent returns immediately regardless of whether an event was available. The event (if present) is unilaterally removed from the queue if a valid XrInstance is provided. On return the eventData parameter is filled with the event’s data and the type field is changed to the event’s type. Runtimes may create valid next chains depending on enabled extensions, but they must guarantee that any such chains point only to objects which fit completely within the original XrEventDataBuffer pointed to by eventData.

Description

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

  • XR_EVENT_UNAVAILABLE

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

The runtime must discard queued events which contain destroyed or otherwise invalid handles.

Table 2. Event Descriptions
Event Description

XrEventDataEventsLost

event queue has overflowed and some events were lost

XrEventDataInstanceLossPending

application is about to lose the instance

XrEventDataInteractionProfileChanged

active input form factor for one or more top level user paths has changed

XrEventDataReferenceSpaceChangePending

runtime will begin operating with updated space bounds

XrEventDataSessionStateChanged

application has changed lifecycle state

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrReleaseSwapchainImage(3)

Name

xrReleaseSwapchainImage - Release a swapchain image

C Specification

The xrReleaseSwapchainImage function is defined as:

XrResult xrReleaseSwapchainImage(
    XrSwapchain                                 swapchain,
    const XrSwapchainImageReleaseInfo*          releaseInfo);

Parameters

Parameter Descriptions

Description

If the swapchain was created with the XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT set in XrSwapchainCreateInfo::createFlags structure, this function must not have been previously called for this swapchain.

The runtime must return XR_ERROR_CALL_ORDER_INVALID if no image has been waited on by calling xrWaitSwapchainImage.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_CALL_ORDER_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrRequestExitSession(3)

Name

xrRequestExitSession - Request to exit a running session.

C Specification

The xrRequestExitSession function is defined as:

XrResult xrRequestExitSession(
    XrSession                                   session);

Parameters

Parameter Descriptions
  • session is a handle to a running XrSession.

Description

An application can only call xrEndSession when the session is in the XR_SESSION_STATE_STOPPING state, which allows runtimes to seamlessly transition from one application’s session to another. When an application wishes to exit a running session, the application can call xrRequestExitSession, requesting that the runtime transition the session to the XR_SESSION_STATE_STOPPING state. When the application receives an XrEventDataSessionStateChanged event indicating that the session has reached the XR_SESSION_STATE_STOPPING state, the application can then call xrEndSession to quit the XR experience seamlessly, transitioning the session through XR_SESSION_STATE_IDLE to the XR_SESSION_STATE_EXITING state.

If session is not running when xrRequestExitSession is called, XR_ERROR_SESSION_NOT_RUNNING must be returned.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrResultToString(3)

Name

xrResultToString - Converts an XrResult to a UTF-8 string

C Specification

XrResult xrResultToString(
    XrInstance                                  instance,
    XrResult                                    value,
    char                                        buffer[XR_MAX_RESULT_STRING_SIZE]);

Parameters

Parameter Descriptions
  • instance is the handle of the instance to ask for the string.

  • value is the XrResult value to turn into a string.

  • buffer is the buffer that will be used to return the string in.

Description

Returns the text version of the provided XrResult value as a UTF-8 string.

In all cases the returned string must be one of:

Result String Return Values
  • The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value 0 results in the string XR_SUCCESS)

  • XR_UNKNOWN_SUCCESS_ concatenated with the positive result number expressed as a decimal number.

  • XR_UNKNOWN_FAILURE_ concatenated with the negative result number expressed as a decimal number.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • value must be a valid XrResult value

  • buffer must be a character array of length XR_MAX_RESULT_STRING_SIZE

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSessionBeginDebugUtilsLabelRegionEXT(3)

Name

xrSessionBeginDebugUtilsLabelRegionEXT - Session begin debug utils label region

C Specification

XrResult xrSessionBeginDebugUtilsLabelRegionEXT(
    XrSession                                   session,
    const XrDebugUtilsLabelEXT*                 labelInfo);

Parameters

Parameter Descriptions
  • session is the XrSession that a label region should be associated with.

  • labelInfo is the XrDebugUtilsLabelEXT containing the label information for the region that should be begun.

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_SESSION_LOST

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

The xrSessionBeginDebugUtilsLabelRegionEXT function begins a label region within session.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSessionEndDebugUtilsLabelRegionEXT(3)

Name

xrSessionEndDebugUtilsLabelRegionEXT - Session end debug utils label region

C Specification

XrResult xrSessionEndDebugUtilsLabelRegionEXT(
    XrSession                                   session);

Parameters

Parameter Descriptions
  • session is the XrSession that a label region should be associated with.

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_SESSION_LOST

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

This function ends the last label region begun with the xrSessionBeginDebugUtilsLabelRegionEXT function within the same session.

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSessionInsertDebugUtilsLabelEXT(3)

Name

xrSessionInsertDebugUtilsLabelEXT - Session insert debug utils label

C Specification

XrResult xrSessionInsertDebugUtilsLabelEXT(
    XrSession                                   session,
    const XrDebugUtilsLabelEXT*                 labelInfo);

Parameters

Parameter Descriptions
  • session is the XrSession that a label region should be associated with.

  • labelInfo is the XrDebugUtilsLabelEXT containing the label information for the region that should be begun.

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_SESSION_LOST

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

The xrSessionInsertDebugUtilsLabelEXT function inserts an individual label within session. The individual labels are useful for different reasons based on the type of debugging scenario. When used with something active like a profiler or debugger, it identifies a single point of time. When used with logging, the individual label identifies that a particular location has been passed at the point the log message is triggered. Because of this usage, individual labels only exist in a log until the next call to any of the label functions:

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSetAndroidApplicationThreadKHR(3)

Name

xrSetAndroidApplicationThreadKHR - declare threads to be of a certain priority type

C Specification

To declare a thread to be of a certain XrAndroidThreadTypeKHR type call:

XrResult xrSetAndroidApplicationThreadKHR(
    XrSession                                   session,
    XrAndroidThreadTypeKHR                      threadType,
    uint32_t                                    threadId);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • threadType is a classification of the declared thread allowing the XR runtime to apply the relevant priority and attributes. If such settings fail, the runtime must return XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR.

  • threadId is the kernel thread ID of the declared thread, as returned by gettid() or android.os.process.myTid(). If the thread ID is invalid, the runtime must return XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR.

Description

xrSetAndroidApplicationThreadKHR allows to declare an XR-critical thread and to classify it.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR

  • XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSetDebugUtilsObjectNameEXT(3)

Name

xrSetDebugUtilsObjectNameEXT - Sets debug utils object name

C Specification

XrResult xrSetDebugUtilsObjectNameEXT(
    XrInstance                                  instance,
    const XrDebugUtilsObjectNameInfoEXT*        nameInfo);

Parameters

Parameter Descriptions
  • instance is the XrInstance that the object was created under.

  • nameInfo is a pointer to an instance of the XrDebugUtilsObjectNameInfoEXT structure specifying the parameters of the name to set on the object.

Description

Valid Usage
Valid Usage (Implicit)
Thread Safety
  • Access to the objectHandle member of the nameInfo parameter must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_FUNCTION_UNSUPPORTED

Applications may change the name associated with an object simply by calling xrSetDebugUtilsObjectNameEXT again with a new string. If XrDebugUtilsObjectNameInfoEXT::objectName is an empty string, then any previously set name is removed.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrStopHapticFeedback(3)

Name

xrStopHapticFeedback - Stop haptic feedback

C Specification

The xrStopHapticFeedback function is defined as:

XrResult xrStopHapticFeedback(
    XrSession                                   session,
    const XrHapticActionInfo*                   hapticActionInfo);

Parameters

Parameter Descriptions
  • session is the XrSession to stop outputting to.

  • hapticActionInfo is a pointer to an XrHapticActionInfo to provide action and subaction path information.

Description

If a haptic event from this XrAction is in progress, when this function is called the runtime must stop that event.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_ACTION_TYPE_MISMATCH

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrStringToPath(3)

Name

xrStringToPath - Converts a string to a semantic path

C Specification

The xrStringToPath function is defined as:

XrResult xrStringToPath(
    XrInstance                                  instance,
    const char*                                 pathString,
    XrPath*                                     path);

Parameters

Parameter Descriptions
  • instance is an instance previously created.

  • pathString is the path name string to retrieve the associated XrPath for.

  • path is the output parameter, which must point to an XrPath. Given a well-formed path name string, this will be populated with an opaque value that is constant for that path string during the lifetime of that instance.

Description

xrStringToPath retrieves the XrPath value for a well-formed path string. If such a value had not yet been assigned by the runtime to the provided path string in this XrInstance, one must be assigned at this point. All calls to this function with the same XrInstance and path string must retrieve the same XrPath value. Upon failure, xrStringToPath must return an appropriate XrResult, and may set the output parameter to XR_NULL_PATH. See Path Atom Type for the conditions under which an error may be returned when this function is given a valid XrInstance and a well-formed path string.

If the runtime’s resources are exhausted and it cannot create the path, a return value of XR_ERROR_PATH_COUNT_EXCEEDED must be returned. If the application specifies a string that is not a well-formed path string, XR_ERROR_PATH_FORMAT_INVALID must be returned.

A return value of XR_SUCCESS from xrStringToPath may not necessarily imply that the runtime has a component or other source of data that will be accessible through that semantic path. It only means that the path string supplied was well-formed and that the retrieved XrPath maps to the given path string within and during the lifetime of the XrInstance given.
Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • pathString must be a null-terminated UTF-8 string

  • path must be a pointer to an XrPath value

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_PATH_FORMAT_INVALID

  • XR_ERROR_PATH_COUNT_EXCEEDED

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrStructureTypeToString(3)

Name

xrStructureTypeToString - Converts an XrStructureType to a UTF-8 string

C Specification

The xrStructureTypeToString function is defined as:

XrResult xrStructureTypeToString(
    XrInstance                                  instance,
    XrStructureType                             value,
    char                                        buffer[XR_MAX_STRUCTURE_NAME_SIZE]);

Parameters

Parameter Descriptions
  • instance is the handle of the instance to ask for the string.

  • value is the XrStructureType value to turn into a string.

  • buffer is the buffer that will be used to return the string in.

Description

Returns the text version of the provided XrStructureType value as a UTF-8 string.

In all cases the returned string must be one of:

Structure Type String Return Values
  • The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value of XR_TYPE_INSTANCE_CREATE_INFO results in the string XR_TYPE_INSTANCE_CREATE_INFO)

  • XR_UNKNOWN_STRUCTURE_TYPE_ concatenated with the structure type number expressed as a decimal number.

Valid Usage (Implicit)
  • instance must be a valid XrInstance handle

  • value must be a valid XrStructureType value

  • buffer must be a character array of length XR_MAX_STRUCTURE_NAME_SIZE

Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSubmitDebugUtilsMessageEXT(3)

Name

xrSubmitDebugUtilsMessageEXT - Submits debug utils message

C Specification

XrResult                                    xrSubmitDebugUtilsMessageEXT(
    XrInstance                                  instance,
    XrDebugUtilsMessageSeverityFlagsEXT         messageSeverity,
    XrDebugUtilsMessageTypeFlagsEXT             messageTypes,
    const XrDebugUtilsMessengerCallbackDataEXT* callbackData);

Parameters

Parameter Descriptions

Description

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

On failure, this command returns
  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

The application can also produce a debug message, and submit it into the OpenXR messaging system.

The call will propagate through the layers and generate callback(s) as indicated by the message’s flags. The parameters are passed on to the callback in addition to the userData value that was defined at the time the messenger was created.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSuggestInteractionProfileBindings(3)

Name

xrSuggestInteractionProfileBindings - Sets the application-suggested bindings for the interaction profile

C Specification

The xrSuggestInteractionProfileBindings function is defined as:

XrResult xrSuggestInteractionProfileBindings(
    XrInstance                                  instance,
    const XrInteractionProfileSuggestedBinding* suggestedBindings);

Parameters

Parameter Descriptions

Description

xrSuggestInteractionProfileBindings sets an interaction profile for which the application can provide default bindings. The application can call xrSuggestInteractionProfileBindings once per interaction profile that it supports.

The application can provide any number of bindings for each action.

If the application successfully calls xrSuggestInteractionProfileBindings more than once for an interaction profile, the runtime must discard the previous suggested bindings and replace them with the new suggested bindings for that profile.

If the interaction profile path does not follow the structure defined in Interaction Profiles or suggested bindings contain paths that do not follow the format defined in Device input subpaths, the runtime must return XR_ERROR_PATH_UNSUPPORTED. If the input source for any of the suggested bindings for the given interaction profile does not exist in the whitelist defined in Interaction Profile Paths, the runtime must return XR_ERROR_PATH_UNSUPPORTED.

If the action set for any action referenced in the suggestedBindings parameter has been included in a call to xrAttachSessionActionSets, the implementation must return XR_ERROR_ACTIONSETS_ALREADY_ATTACHED.

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

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_ACTIONSETS_ALREADY_ATTACHED

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_UNSUPPORTED

  • XR_ERROR_PATH_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrSyncActions(3)

Name

xrSyncActions - Updates the current state of input actions

C Specification

The xrSyncActions function is defined as:

XrResult xrSyncActions(
    XrSession                                   session,
    const XrActionsSyncInfo*                    syncInfo);

Parameters

Parameter Descriptions
  • session is a handle to the XrSession that all provided action set handles belong to.

  • syncInfo is an XrActionsSyncInfo providing information to synchronize action states.

Description

xrSyncActions updates the current state of input actions. Repeated input action state queries between subsequent synchronization calls must return the same values. The XrActionSet structures referenced in the syncInfo.activeActionSets must have been previously attached to the session via xrAttachSessionActionSets. If any action sets not attached to this session are passed to xrSyncActions it must return XR_ERROR_ACTIONSET_NOT_ATTACHED. Subsets of the bound action sets can be synchronized in order to control which actions are seen as active.

If session is not focused, the runtime must return XR_SESSION_NOT_FOCUSED, and all action states in the session must be inactive.

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

  • XR_SESSION_LOSS_PENDING

  • XR_SESSION_NOT_FOCUSED

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ACTIONSET_NOT_ATTACHED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_PATH_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrThermalGetTemperatureTrendEXT(3)

Name

xrThermalGetTemperatureTrendEXT - xrThermalGetTemperatureTrendEXT

C Specification

XrResult xrThermalGetTemperatureTrendEXT(
    XrSession                                   session,
    XrPerfSettingsDomainEXT                     domain,
    XrPerfSettingsNotificationLevelEXT*         notificationLevel,
    float*                                      tempHeadroom,
    float*                                      tempSlope);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • domain : the processing domain

  • notificationLevel : the current warning level

  • tempHeadroom : temperature headroom in degrees Celsius, expressing how far the most-critical temperature of the domain is from its thermal throttling threshold temperature.

  • tempSlope : the current trend in degrees Celsius per second of the most critical temperature of the domain.

Description

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_SESSION_LOST

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrWaitFrame(3)

Name

xrWaitFrame - Frame timing function

C Specification

The xrWaitFrame function is defined as:

XrResult xrWaitFrame(
    XrSession                                   session,
    const XrFrameWaitInfo*                      frameWaitInfo,
    XrFrameState*                               frameState);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • frameWaitInfo exists for extensibility purposes, it is NULL or a pointer to a valid XrFrameWaitInfo.

  • frameState is a pointer to a valid XrFrameState, an output parameter.

Description

xrWaitFrame throttles the application frame loop in order to synchronize application frame submissions with the display. xrWaitFrame returns a predicted display time for the next time that the runtime predicts a composited frame will be displayed. The runtime may affect this computation by changing the return values and throttling of xrWaitFrame in response to feedback from frame submission and completion times in xrEndFrame. When less than one frame interval has passed since the previous return from xrWaitFrame, the runtime should block until the beginning of the next frame interval. If more than one frame interval has passed since the last return from xrWaitFrame, the runtime may return immediately or block until the beginning of the next frame interval.

In the case that an application has pipelined frame submissions, the application should compute the appropriate target display time using both the predicted display time and predicted display interval. The application should use the computed target display time when requesting space and view locations for rendering.

The XrFrameState::predictedDisplayTime returned by xrWaitFrame must be monotonically increasing.

The runtime may dynamically adjust the start time of the frame interval relative to the display hardware’s refresh cycle to minimize graphics processor contention between the application and the compositor.

xrWaitFrame must be callable from any thread, including a different thread than xrBeginFrame/xrEndFrame are being called from.

Calling xrWaitFrame must be externally synchronized by the application, concurrent calls may result in undefined behavior.

The runtime must return XR_ERROR_SESSION_NOT_RUNNING if the session is not running.

Note

The engine simulation should advance based on the display time. Every stage in the engine pipeline should use the exact same display time for one particular application-generated frame. An accurate and consistent display time across all stages and threads in the engine pipeline is important to avoid object motion judder. If the application has multiple pipeline stages, the application should pass its computed display time through its pipeline, as xrWaitFrame must be called only once per frame.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • If frameWaitInfo is not NULL, frameWaitInfo must be a pointer to a valid XrFrameWaitInfo structure

  • frameState must be a pointer to an XrFrameState structure

Thread Safety
  • Access to the session parameter by any other xrWaitFrame call must be externally synchronized

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_VALIDATION_FAILURE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

xrWaitSwapchainImage(3)

Name

xrWaitSwapchainImage - Wait for a swapchain image to be available

C Specification

The xrWaitSwapchainImage function is defined as:

XrResult xrWaitSwapchainImage(
    XrSwapchain                                 swapchain,
    const XrSwapchainImageWaitInfo*             waitInfo);

Parameters

Parameter Descriptions
  • swapchain is the swapchain from which to wait for an image.

  • waitInfo is a pointer to an XrSwapchainImageWaitInfo structure.

Description

Before an application can begin writing to a swapchain image, it must first wait on the image to avoid writing to it before the compositor has finished reading from it. xrWaitSwapchainImage will implicitly wait on the oldest acquired swapchain image which has not yet been successfully waited on. Once a swapchain image has been successfully waited on, it must be released before waiting on the next acquired swapchain image.

This function may block for longer than the timeout specified in XrSwapchainImageWaitInfo due to scheduling or contention.

If the timeout expires without the image becoming available for writing, XR_TIMEOUT_EXPIRED must be returned. If xrWaitSwapchainImage returns XR_TIMEOUT_EXPIRED, the next call to xrWaitSwapchainImage will wait on the same image index again until the function succeeds with XR_SUCCESS. Note that this is not an error code; XR_SUCCEEDED(XR_TIMEOUT_EXPIRED) is true.

The runtime must return XR_ERROR_CALL_ORDER_INVALID if no image has been acquired by calling xrAcquireSwapchainImage.

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

  • XR_TIMEOUT_EXPIRED

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_CALL_ORDER_INVALID

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

Object Handles

XrAction(3)

Name

XrAction - Opaque handle to an action

C Specification

XR_DEFINE_HANDLE(XrAction)

Description

Action handles are used to refer to individual actions when retrieving action data, creating action spaces, or sending haptic events.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionSet(3)

Name

XrActionSet - Opaque handle to an action set

C Specification

XR_DEFINE_HANDLE(XrActionSet)

Description

Action sets are application-defined collections of actions. They are attached to a given XrSession with a xrAttachSessionActionSets call. They are enabled or disabled by the application via xrSyncActions depending on the current application context. For example, a game may have one set of actions that apply to controlling a character and another set for navigating a menu system. When these actions are grouped into two XrActionSet handles they can be selectively enabled and disabled using a single function call.

Actions are passed a handle to their XrActionSet when they are created.

Action sets are created by calling xrCreateActionSet:

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrDebugUtilsMessengerEXT(3)

Name

XrDebugUtilsMessengerEXT - Callback for debug data

C Specification

XR_DEFINE_HANDLE(XrDebugUtilsMessengerEXT)

Description

XrDebugUtilsMessengerEXT represents a callback function and associated filters registered with the runtime.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInstance(3)

Name

XrInstance - Opaque handle to an instance object

C Specification

XR_DEFINE_HANDLE(XrInstance)

Description

An OpenXR instance is an object that allows an OpenXR application to communicate with an OpenXR runtime. The application accomplishes this communication by calling xrCreateInstance and receiving a handle to the resulting XrInstance object.

The XrInstance object stores and tracks OpenXR-related application state, without storing any such state in the application’s global address space. This allows the application to create multiple instances as well as safely encapsulate the application’s OpenXR state since this object is opaque to the application. OpenXR runtimes may limit the number of simultaneous XrInstance objects that may be created and used, but they must support the creation and usage of at least one XrInstance object per process.

Physically, this state may be stored in any of the OpenXR loader, OpenXR API layers or the OpenXR runtime components. The exact storage and distribution of this saved state is implementation-dependent, except where indicated by this specification.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSession(3)

Name

XrSession - Opaque handle to a session object

C Specification

XR_DEFINE_HANDLE(XrSession)

Description

A session represents an application’s intention to display XR content to the user.

First, the application creates a session by choosing a system and a graphics API and calling xrCreateSession, which creates a session in the XR_SESSION_STATE_IDLE state. The application then sets up an xrPollEvent loop to monitor for session state changes delivered through the XrEventDataSessionStateChanged event. When the runtime determines that the system is ready to start transitioning to this session’s XR content, it notifies the application that its session has moved into the XR_SESSION_STATE_READY state. When the application is ready to proceed and display its XR content, it calls xrBeginSession, which starts its session running. While the session is running, the application is expected to continuously run its frame loop by calling xrWaitFrame, xrBeginFrame and xrEndFrame each frame, to establish synchronization with the runtime. Once the runtime is synchronized with the application’s frame loop and ready to display its frames, the session will move into the XR_SESSION_STATE_SYNCHRONIZED state. For frames where xrWaitFrame returns an XrFrameState with shouldRender set to true, the application should render its composition layers and submit them to xrEndFrame. If the application desires to leave a running session, it should call the xrRequestExitSession function to request that the runtime transition its session to the XR_SESSION_STATE_STOPPING state as soon as possible. Once the application reaches the XR_SESSION_STATE_STOPPING state, it can call xrEndSession to stop the XR session, after which the session will transition through XR_SESSION_STATE_IDLE to the XR_SESSION_STATE_EXITING state.

A session is considered running after a successful call to xrBeginSession and remains running until any call is made to xrEndSession. Certain functions are only valid to call when a session is running, such as xrWaitFrame, or else the XR_ERROR_SESSION_NOT_RUNNING error must be returned by the runtime.

A session is considered not running before a successful call to xrBeginSession and becomes not running again after any call is made to xrEndSession. Certain functions are only valid to call when a session is not running, such as xrBeginSession, or else the XR_ERROR_SESSION_RUNNING error must be returned by the runtime.

If an error is returned from xrBeginSession, the session remains in its current running or not running state. Calling xrEndSession always transitions a session to the not running state, regardless of any errors returned.

Only running sessions may become focused sessions that receive XR input. When a session is not running, the application must not submit frames. This is important because without a running session, the runtime no longer has to spend resources on sub-systems (tracking etc.) that are no longer needed by the application.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpace(3)

Name

XrSpace - Opaque handle to a space

C Specification

Across both virtual reality and augmented reality, XR applications have a core need to map the location of virtual objects to the corresponding real-world locations where they will be rendered. Spaces allow applications to explicitly create and specify the frames of reference in which they choose to track the real world, and then determine how those frames of reference move relative to one another over time.

XR_DEFINE_HANDLE(XrSpace)

Description

Spaces are represented by XrSpace handles, which the application creates and then uses in API calls. Whenever an application calls a function that returns coordinates, it provides an XrSpace to specify the frame of reference in which those coordinates will be expressed. Similarly, when providing coordinates to a function, the application specifies which XrSpace the runtime should use to interpret those coordinates.

OpenXR defines a set of well-known reference spaces that applications use to bootstrap their spatial reasoning. These reference spaces are: VIEW, LOCAL and STAGE. Each reference space has a well-defined meaning, which establishes where its origin is positioned and how its axes are oriented.

Runtimes whose tracking systems improve their understanding of the world over time may track spaces independently. For example, even though a LOCAL space and a STAGE space each map their origin to a static position in the world, a runtime with an inside-out tracking system may introduce slight adjustments to the origin of each space on a continuous basis to keep each origin in place.

Beyond well-known reference spaces, runtimes expose other independently-tracked spaces, such as a pose action space that tracks the pose of a motion controller over time.

When one or both spaces are tracking a dynamic object, passing in an updated time to xrLocateSpace each frame will result in an updated relative pose. For example, the location of the left hand’s pose action space in the STAGE reference space will change each frame as the user’s hand moves relative to the stage’s predefined origin on the floor. In other XR APIs, it is common to report the "pose" of an object relative to some presumed underlying global space. This API is careful to not explicitly define such an underlying global space, because it does not apply to all systems. Some systems will support no STAGE space, while others may support a STAGE space that switches between various physical stages with dynamic availability. To satisfy this wide variability, "poses" are always described as the relationship between two spaces.

Some devices improve their understanding of the world as the device is used. The location returned by xrLocateSpace in later frames may change over time, even for spaces that track static objects, as either the target space or base space adjusts its origin.

Composition layers submitted by the application include an XrSpace for the runtime to use to position that layer over time. Composition layers whose XrSpace is relative to the VIEW reference space are implicitly "head-locked", even if they may not be "display-locked" for non-head-mounted form factors.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpatialAnchorMSFT(3)

Name

XrSpatialAnchorMSFT - Represents a spatial anchor

C Specification

This extension allows an application to create a spatial anchor, an arbitrary freespace point in the user’s physical environment that will then be tracked by the runtime. The runtime should then adjust the position and orientation of that anchor’s origin over time as needed, independently of all other spaces and anchors, to ensure that it maintains its original mapping to the real world.

XR_DEFINE_HANDLE(XrSpatialAnchorMSFT)

Description

Spatial anchors are often used in combination with an UNBOUNDED_MSFT reference space. UNBOUNDED_MSFT reference spaces adjust their origin as necessary to keep the viewer’s coordinates relative to the space’s origin stable. Such adjustments maintain the visual stability of content currently near the viewer, but may cause content placed far from the viewer to drift in its alignment to the real world by the time the user moves close again. By creating an XrSpatialAnchorMSFT where a piece of content is placed and then always rendering that content relative to its anchor’s space, an application can ensure that each piece of content stays at a fixed location in the environment.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchain(3)

Name

XrSwapchain - Opaque handle to a swapchain object

C Specification

XR_DEFINE_HANDLE(XrSwapchain)

Description

Normal XR applications will want to present rendered images to the user. To allow this, the runtime provides images organized in swapchains for the application to render into. The runtime must allow applications to create multiple swapchains.

Swapchain image format support by the runtime is specified by the xrEnumerateSwapchainFormats function. Runtimes should support R8G8B8A8 and R8G8B8A8 sRGB formats if possible.

Swapchain images can be 2D or 2D Array.

Rendering operations involving composition of submitted layers should be assumed to be internally performed by the runtime in linear color space. Images submitted in sRGB color space must be created using an API-specific sRGB format (e.g. DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, GL_SRGBA, VK_FORMAT_R8G8B8A8_SRGB) to apply automatic sRGB-to-linear conversion when read by the runtime. All other formats will be treated as linear values.

Note

DXGI resources will be created with their associated TYPELESS format, but the runtime will use the application-specified format for reading the data.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

Structures

XrActionCreateInfo(3)

Name

XrActionCreateInfo - XrAction creation info

C Specification

The XrActionCreateInfo structure is defined as:

typedef struct XrActionCreateInfo {
    XrStructureType    type;
    const void*        next;
    char               actionName[XR_MAX_ACTION_NAME_SIZE];
    XrActionType       actionType;
    uint32_t           countSubactionPaths;
    const XrPath*      subactionPaths;
    char               localizedActionName[XR_MAX_LOCALIZED_ACTION_NAME_SIZE];
} XrActionCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • actionName is an array containing a NULL terminated string with the name of this action.

  • actionType is the XrActionType of the action to be created.

  • countSubactionPaths is the number of elements in the subactionPaths array. If subactionPaths is NULL, this parameter must be 0.

  • subactionPaths is an array of XrPath or NULL. If this array is specified, it contains one or more subaction paths that the application intends to query action state for.

  • localizedActionName is an array containing a NULL terminated UTF-8 string that can be presented to the user as a description of the action. This string should be in the system’s current active locale.

Description

Subaction paths are a mechanism that enables applications to use the same action name and handle on multiple devices. Applications can query action state using subaction paths that differentiate data coming from each device. This allows the runtime to group logically equivalent actions together in system UI. For instance, an application could create a single pick_up action with the /user/hand/left and /user/hand/right subaction paths and use the subaction paths to independently query the state of pick_up_with_left_hand and pick_up_with_right_hand.

Applications can create actions with or without the subactionPaths set to a list of paths. If this list of paths is omitted (i.e. subactionPaths is set to NULL, and countSubactionPaths is set to 0), the application is opting out of filtering action results by subaction paths and any call to get action data must also omit subaction paths.

If subactionPaths is specified and any of the following conditions are not satisfied, the runtime must return XR_ERROR_PATH_UNSUPPORTED:

  • Each path provided is one of:

    • /user/head

    • /user/hand/left

    • /user/hand/right

    • /user/gamepad

    • /user

  • No path appears in the list more than once

Including /user in the list of subaction paths creates an 'other' bucket for action data to be filtered into. When /user is included in the list passed to xrGetActionState* the runtime must include data for all devices which are not included in the other subaction paths into the /user bucket. Extensions may append additional top level user paths to the above list.

The runtime must return XR_ERROR_PATH_UNSUPPORTED in the following circumstances:

  • The application specified subaction paths at action creation and the application called xrGetActionState* or a haptic function with an empty subaction path array.

  • The application called xrGetActionState* or a haptic function with a subaction path that was not specified when the action was created.

If actionName or localizedActionName are empty strings, the runtime must return XR_ERROR_NAME_INVALID or XR_ERROR_LOCALIZED_NAME_INVALID respectively. If actionName or localizedActionName are duplicates of the corresponding field for any existing action in the specified action set, the runtime must return XR_ERROR_NAME_DUPLICATED or XR_ERROR_LOCALIZED_NAME_DUPLICATED respectively. If the conflicting action is destroyed, the conflicting field is no longer considered duplicated. If actionName contains characters which are not allowed in a single level of a well-formed path string, the runtime must return XR_ERROR_PATH_FORMAT_INVALID.

Valid Usage (Implicit)
  • type must be XR_TYPE_ACTION_CREATE_INFO

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • actionName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_ACTION_NAME_SIZE

  • actionType must be a valid XrActionType value

  • If countSubactionPaths is not 0, subactionPaths must be a pointer to an array of countSubactionPaths valid XrPath values

  • localizedActionName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_LOCALIZED_ACTION_NAME_SIZE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionSetCreateInfo(3)

Name

XrActionSetCreateInfo - XrActionSet creation info

C Specification

The XrActionSetCreateInfo structure is defined as:

typedef struct XrActionSetCreateInfo {
    XrStructureType    type;
    const void*        next;
    char               actionSetName[XR_MAX_ACTION_SET_NAME_SIZE];
    char               localizedActionSetName[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE];
    uint32_t           priority;
} XrActionSetCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • actionSetName is an array containing a NULL terminated non-empty string with the name of this action set.

  • localizedActionSetName is an array containing a NULL terminated UTF-8 string that can be presented to the user as a description of the action set. This string should be presented in the system’s current active locale.

  • priority defines which action sets' actions are active on a given input source when actions on multiple active action sets are bound to the same input source. Larger priority numbers take precedence over smaller priority numbers.

Description

When multiple actions are bound to the same input source, the priority of each action set determines which bindings are suppressed. Runtimes must ignore input sources from action sets with a lower priority number if those specific input sources are also present in active actions within a higher priority action set. If multiple action sets with the same priority are bound to the same input source and that is the highest priority number, runtimes must process all those bindings at the same time.

Two actions are considered to be bound to the same input source if they use the same identifier and optional location path segments, even if they have different component segments.

When runtimes are ignoring bindings because of priority, they must treat the binding to that input source as though they do not exist. That means the isActive field must be XR_FALSE when retrieving action data, and that the runtime must not provide any visual, haptic, or other feedback related to the binding of that action to that input source. Other actions in the same action set which are bound to input sources that do not collide are not affected and are processed as normal.

If actionSetName or localizedActionSetName are empty strings, the runtime must return XR_ERROR_NAME_INVALID or XR_ERROR_LOCALIZED_NAME_INVALID respectively. If actionSetName or localizedActionSetName are duplicates of the corresponding field for any existing action set in the specified session, the runtime must return XR_ERROR_NAME_DUPLICATED or XR_ERROR_LOCALIZED_NAME_DUPLICATED respectively. If the conflicting action set is destroyed, the conflicting field is no longer considered duplicated. If actionSetName contains characters which are not allowed in a single level of a well-formed path string, the runtime must return XR_ERROR_PATH_FORMAT_INVALID.

Valid Usage (Implicit)
  • type must be XR_TYPE_ACTION_SET_CREATE_INFO

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • actionSetName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_ACTION_SET_NAME_SIZE

  • localizedActionSetName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionSpaceCreateInfo(3)

Name

XrActionSpaceCreateInfo - Creation info for an action space

C Specification

The XrActionSpaceCreateInfo structure is defined as:

typedef struct XrActionSpaceCreateInfo {
    XrStructureType    type;
    const void*        next;
    XrAction           action;
    XrPath             subactionPath;
    XrPosef            poseInActionSpace;
} XrActionSpaceCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • action is a handle to a pose XrAction previously created with xrCreateAction.

  • subactionPath is XR_NULL_PATH or an XrPath that was specified when the action was created. If subactionPath is a valid path not specified when the action was created the runtime must return XR_ERROR_PATH_UNSUPPORTED. If this parameter is set, the runtime must create a space that is relative to only that subaction’s pose binding.

  • poseInActionSpace is an XrPosef defining the position and orientation of the new space’s origin within the natural reference frame of the pose action.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionStateBoolean(3)

Name

XrActionStateBoolean - Boolean action state

C Specification

The XrActionStateBoolean structure is defined as:

typedef struct XrActionStateBoolean {
    XrStructureType    type;
    void*              next;
    XrBool32           currentState;
    XrBool32           changedSinceLastSync;
    XrTime             lastChangeTime;
    XrBool32           isActive;
} XrActionStateBoolean;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • currentState is the current state of the action.

  • changedSinceLastSync is XR_TRUE if the value of currentState is different than it was before the most recent call to xrSyncActions. This parameter can be combined with currentState to detect rising and falling edges since the previous call to xrSyncActions. E.g. if both changedSinceLastSync and currentState are XR_TRUE then a rising edge (XR_FALSE to XR_TRUE) has taken place.

  • lastChangeTime is the XrTime when this action’s value last changed.

  • isActive is XR_TRUE if and only if there exists an input source that is contributing to the current state of this action.

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionStateFloat(3)

Name

XrActionStateFloat - Floating point action state

C Specification

The XrActionStateFloat structure is defined as:

typedef struct XrActionStateFloat {
    XrStructureType    type;
    void*              next;
    float              currentState;
    XrBool32           changedSinceLastSync;
    XrTime             lastChangeTime;
    XrBool32           isActive;
} XrActionStateFloat;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • currentState is the current state of the Action.

  • changedSinceLastSync is XR_TRUE if the value of currentState is different than it was before the most recent call to xrSyncActions.

  • lastChangeTime is the XrTime in nanoseconds since this action’s value last changed.

  • isActive is XR_TRUE if and only if there exists an input source that is contributing to the current state of this action.

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionStateGetInfo(3)

Name

XrActionStateGetInfo - Information to get action state

C Specification

The XrActionStateGetInfo structure is used to provide action and subaction paths when calling xrGetActionState* function. It is defined as:

typedef struct XrActionStateGetInfo {
    XrStructureType    type;
    const void*        next;
    XrAction           action;
    XrPath             subactionPath;
} XrActionStateGetInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • action is the XrAction being queried.

  • subactionPath is the subaction path XrPath to query data from, or XR_NULL_PATH to specify all subaction paths. If the subaction path is specified, it is one of the subaction paths that were specified when the action was created. If the subaction path was not specified when the action was created, the runtime must return XR_ERROR_PATH_UNSUPPORTED. If this parameter is specified, the runtime must return data that originates only from the subaction paths specified.

Description

See XrActionCreateInfo for a description of subaction paths, and the restrictions on their use.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionStatePose(3)

Name

XrActionStatePose - Pose action metadata

C Specification

The XrActionStatePose structure is defined as:

typedef struct XrActionStatePose {
    XrStructureType    type;
    void*              next;
    XrBool32           isActive;
} XrActionStatePose;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • isActive is XR_TRUE if and only if there exists an input source that is being tracked by this pose action.

Description

A pose action must not be bound to multiple input sources, according to the previously defined rule.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionStateVector2f(3)

Name

XrActionStateVector2f - 2D float vector action state

C Specification

The XrActionStateVector2f structure is defined as:

typedef struct XrActionStateVector2f {
    XrStructureType    type;
    void*              next;
    XrVector2f         currentState;
    XrBool32           changedSinceLastSync;
    XrTime             lastChangeTime;
    XrBool32           isActive;
} XrActionStateVector2f;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • currentState is the current XrVector2f state of the Action.

  • changedSinceLastSync is XR_TRUE if the value of currentState is different than it was before the most recent call to xrSyncActions.

  • lastChangeTime is the XrTime in nanoseconds since this action’s value last changed.

  • isActive is XR_TRUE if and only if there exists an input source that is contributing to the current state of this action.

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionSuggestedBinding(3)

Name

XrActionSuggestedBinding - Suggested binding for a single action

C Specification

The XrActionSuggestedBinding structure is defined as:

typedef struct XrActionSuggestedBinding {
    XrAction    action;
    XrPath      binding;
} XrActionSuggestedBinding;

Members

Member Descriptions
  • action is the XrAction handle for an action

  • binding is the XrPath of a binding for the action specified in action. This path is any top level user path plus input source path, for example /user/hand/right/input/trigger/click. See suggested bindings for more details.

Description

Valid Usage (Implicit)
  • action must be a valid XrAction handle

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActionsSyncInfo(3)

Name

XrActionsSyncInfo - Information to sync actions

C Specification

The XrActionsSyncInfo structure is defined as:

typedef struct XrActionsSyncInfo {
    XrStructureType             type;
    const void*                 next;
    uint32_t                    countActiveActionSets;
    const XrActiveActionSet*    activeActionSets;
} XrActionsSyncInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • countActiveActionSets is an integer specifying the number of valid elements in the activeActionSets array.

  • activeActionSets is NULL or a pointer to an array of one or more XrActiveActionSet structures that should be synchronized.

Description

Valid Usage (Implicit)
  • type must be XR_TYPE_ACTIONS_SYNC_INFO

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • If countActiveActionSets is not 0, activeActionSets must be a pointer to an array of countActiveActionSets valid XrActiveActionSet structures

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrActiveActionSet(3)

Name

XrActiveActionSet - Describes an active action set

C Specification

The XrActiveActionSet structure is defined as:

typedef struct XrActiveActionSet {
    XrActionSet    actionSet;
    XrPath         subactionPath;
} XrActiveActionSet;

Members

Member Descriptions
  • actionSet is the handle of the action set to activate.

  • subactionPath is a subaction path that was declared when one or more actions in the action set was created or XR_PATH_NULL if the actions in this action set were not declared with subaction paths. If the application wants to activate the action set on more than one subaction path, it can include additional XrActiveActionSet structs with the other subactionPath values.

Description

This structure defines a single active action set and subaction path combination. Applications can provide a list of these structures to the xrSyncActions function.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrApiLayerProperties(3)

Name

XrApiLayerProperties - Structure specifying layer properties

C Specification

The XrApiLayerProperties structure is defined as:

typedef struct XrApiLayerProperties {
    XrStructureType    type;
    void*              next;
    char               layerName[XR_MAX_API_LAYER_NAME_SIZE];
    XrVersion          specVersion;
    uint32_t           layerVersion;
    char               description[XR_MAX_API_LAYER_DESCRIPTION_SIZE];
} XrApiLayerProperties;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • layerName is a string specifying the name of the API layer. Use this name in the XrInstanceCreateInfo::enabledApiLayerNames array to enable this API layer for an instance.

  • specVersion is the API version the API layer was written to, encoded as described in the API Version Numbers and Semantics section.

  • layerVersion is the version of this API layer. It is an integer, increasing with backward compatible changes.

  • description is a string providing additional details that can be used by the application to identify the API layer.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrApplicationInfo(3)

Name

XrApplicationInfo - Structure specifying application info

C Specification

The XrApplicationInfo structure is defined as:

typedef struct XrApplicationInfo {
    char         applicationName[XR_MAX_APPLICATION_NAME_SIZE];
    uint32_t     applicationVersion;
    char         engineName[XR_MAX_ENGINE_NAME_SIZE];
    uint32_t     engineVersion;
    XrVersion    apiVersion;
} XrApplicationInfo;

Members

Member Descriptions
  • applicationName is a non-empty string containing the name of the application.

  • applicationVersion is an unsigned integer variable containing the developer-supplied version number of the application.

  • engineName is a string containing the name of the engine (if any) used to create the application. It may be empty to indicate no specified engine.

  • engineVersion is an unsigned integer variable containing the developer-supplied version number of the engine used to create the application. May be zero to indicate no specified engine.

  • apiVersion is the version of this API against which the application will run, encoded as described in the API Version Numbers and Semantics section. If the runtime does not support the requested apiVersion it must return XR_ERROR_API_VERSION_UNSUPPORTED.

Description

Valid Usage (Implicit)
  • applicationName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_APPLICATION_NAME_SIZE

  • engineName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_ENGINE_NAME_SIZE

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrBaseInStructure(3)

Name

XrBaseInStructure - Convenience type for iterating (read only)

C Specification

The XrBaseInStructure structure is defined as:

typedef struct XrBaseInStructure {
    XrStructureType                    type;
    const struct XrBaseInStructure*    next;
} XrBaseInStructure;

Members

Member Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

Description

XrBaseInStructure can be used to facilitate iterating through a read-only structure pointer chain.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrBaseOutStructure(3)

Name

XrBaseOutStructure - Convenience type for iterating (mutable)

C Specification

The XrBaseOutStructure structure is defined as:

typedef struct XrBaseOutStructure {
    XrStructureType               type;
    struct XrBaseOutStructure*    next;
} XrBaseOutStructure;

Members

Member Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

Description

XrBaseOutStructure can be used to facilitate iterating through a structure pointer chain that returns data back to the application.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrBoundSourcesForActionEnumerateInfo(3)

Name

XrBoundSourcesForActionEnumerateInfo - Information to query the bound input sources for an action

C Specification

The XrBoundSourcesForActionEnumerateInfo structure is defined as:

typedef struct XrBoundSourcesForActionEnumerateInfo {
    XrStructureType    type;
    const void*        next;
    XrAction           action;
} XrBoundSourcesForActionEnumerateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • action is the handle of the action to query.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrColor4f(3)

Name

XrColor4f - Color Vector

C Specification

The XrColor4f structure is defined as:

typedef struct XrColor4f {
    float    r;
    float    g;
    float    b;
    float    a;
} XrColor4f;

Members

Member Descriptions
  • r is the red component of the color.

  • g is the green component of the color.

  • b is the blue component of the color.

  • a is the alpha component of the color.

Description

Unless otherwise specified, colors are encoded as linear (not with sRGB nor other gamma compression) values with individual components being in the range of 0.0 through 1.0, and without the RGB components being premultiplied by the alpha component.

See Also

No cross-references are available

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerBaseHeader(3)

Name

XrCompositionLayerBaseHeader - Composition layer base header

C Specification

The XrCompositionLayerBaseHeader structure is defined as:

typedef struct XrCompositionLayerBaseHeader {
    XrStructureType            type;
    const void*                next;
    XrCompositionLayerFlags    layerFlags;
    XrSpace                    space;
} XrCompositionLayerBaseHeader;

Members

Member Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

  • layerFlags is a bitmask of XrCompositionLayerFlagBits describing flags to apply to the layer.

  • space is the XrSpace in which the layer will be kept stable over time.

Description

All composition layer structures begin with the elements described in the XrCompositionLayerBaseHeader. The XrCompositionLayerBaseHeader structure is not intended to be directly used, but forms a basis for defining current and future structures containing composition layer information. The XrFrameEndInfo structure contains an array of pointers to these polymorphic header structures. All composition layer type pointers must be type-castable as an XrCompositionLayerBaseHeader pointer.

Valid Usage (Implicit)
  • type must be one of the following XrStructureType values: XR_TYPE_COMPOSITION_LAYER_CUBE_KHR, XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR, XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR, XR_TYPE_COMPOSITION_LAYER_PROJECTION, XR_TYPE_COMPOSITION_LAYER_QUAD

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • layerFlags must be 0 or a valid combination of XrCompositionLayerFlagBits values

  • space must be a valid XrSpace handle

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerCubeKHR(3)

Name

XrCompositionLayerCubeKHR - Cube map layer composition info

C Specification

The XrCompositionLayerCubeKHR structure is defined as:

typedef struct XrCompositionLayerCubeKHR {
    XrStructureType            type;
    const void*                next;
    XrCompositionLayerFlags    layerFlags;
    XrSpace                    space;
    XrEyeVisibility            eyeVisibility;
    XrSwapchain                swapchain;
    uint32_t                   imageArrayIndex;
    XrQuaternionf              orientation;
} XrCompositionLayerCubeKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • layerFlags is any flags to apply to this layer.

  • space is the XrSpace in which the orientation of the cube layer is evaluated over time.

  • eye is the eye represented by this layer.

  • swapchain is the swapchain.

  • imageArrayIndex is the image array index, with 0 meaning the first or only array element.

  • orientation is the orientation of the environment map in the space.

Description

XrCompositionLayerCubeKHR contains the information needed to render a cube map when calling xrEndFrame. XrCompositionLayerCubeKHR is an alias type for the base struct XrCompositionLayerBaseHeader used in XrFrameEndInfo.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerCylinderKHR(3)

Name

XrCompositionLayerCylinderKHR - Cylindrical layer composition info

C Specification

The XrCompositionLayerCylinderKHR structure is defined as:

typedef struct XrCompositionLayerCylinderKHR {
    XrStructureType            type;
    const void*                next;
    XrCompositionLayerFlags    layerFlags;
    XrSpace                    space;
    XrEyeVisibility            eyeVisibility;
    XrSwapchainSubImage        subImage;
    XrPosef                    pose;
    float                      radius;
    float                      centralAngle;
    float                      aspectRatio;
} XrCompositionLayerCylinderKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • layerFlags specifies options for the layer.

  • space is the XrSpace in which the pose of the cylinder layer is evaluated over time.

  • eye is the eye represented by this layer.

  • subImage identifies the image XrSwapchainSubImage to use.

  • pose is an XrPosef defining the position and orientation of the center point of the view of the cylinder within the reference frame of the space.

  • radius is the non-negative radius of the cylinder. Values of zero or floating point positive infinity are treated as an infinite cylinder.

  • centralAngle is the angle of the visible section of the cylinder, based at 0 radians, in the range of [0, 2π). It grows symmetrically around the 0 radian angle.

  • aspectRatio is the ratio of the visible cylinder section width / height. The height of the cylinder is given by: (cylinder radius × cylinder angle) / aspectRatio.

Description

XrCompositionLayerCylinderKHR contains the information needed to render a texture onto a cylinder when calling xrEndFrame. XrCompositionLayerCylinderKHR is an alias type for the base struct XrCompositionLayerBaseHeader used in XrFrameEndInfo.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerDepthInfoKHR(3)

Name

XrCompositionLayerDepthInfoKHR - Depth map layer info

C Specification

When submitting depth buffers along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.

The XrCompositionLayerDepthInfoKHR structure is defined as:

typedef struct XrCompositionLayerDepthInfoKHR {
    XrStructureType        type;
    const void*            next;
    XrSwapchainSubImage    subImage;
    float                  minDepth;
    float                  maxDepth;
    float                  nearZ;
    float                  farZ;
} XrCompositionLayerDepthInfoKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • subImage identifies the depth image XrSwapchainSubImage to be associated with the color swapchain. The contained imageRect specifies the valid portion of the depth image to use, in pixels. The contained imageArrayIndex is the depth image array index, with 0 meaning the first or only array element.

  • minDepth and maxDepth are the range of depth values the depthSwapchain could have, in the range of [0.0,1.0]. This is akin to min and max values of OpenGL’s glDepthRange, but with the requirement here that maxDepth ≥ minDepth.

  • nearZ is the positive distance in meters of the minDepth value in the depth swapchain. Applications may use a nearZ that is greater than farZ to indicate depth values are reversed. nearZ can be infinite.

  • farZ is the positive distance in meters of the maxDepth value in the depth swapchain. farZ can be infinite. Applications must not use the same value as nearZ.

Description

XrCompositionLayerDepthInfoKHR contains the information needed to specify an extra layer with depth information. When submitting depth buffers along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerEquirectKHR(3)

Name

XrCompositionLayerEquirectKHR - Equirectangular layer composition info

C Specification

The XrCompositionLayerEquirectKHR structure is defined as:

typedef struct XrCompositionLayerEquirectKHR {
    XrStructureType            type;
    const void*                next;
    XrCompositionLayerFlags    layerFlags;
    XrSpace                    space;
    XrEyeVisibility            eyeVisibility;
    XrSwapchainSubImage        subImage;
    XrPosef                    pose;
    float                      radius;
    XrVector2f                 scale;
    XrVector2f                 bias;
} XrCompositionLayerEquirectKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • layerFlags specifies options for the layer.

  • space is the XrSpace in which the pose of the equirect layer is evaluated over time.

  • eye is the eye represented by this layer.

  • subImage identifies the image XrSwapchainSubImage to use.

  • pose is an XrPosef defining the position and orientation of the center point of the sphere onto which the equirect image data is mapped, relative to the reference frame of the space.

  • radius is the non-negative radius of the sphere onto which the equirect image data is mapped. Values of zero or floating point positive infinity are treated as an infinite sphere.

  • scale is an XrVector2f indicating a scale of the texture coordinates after the mapping to 2D.

  • bias is an XrVector2f indicating a bias of the texture coordinates after the mapping to 2D.

Description

XrCompositionLayerEquirectKHR contains the information needed to render an equirectangular image onto a sphere when calling xrEndFrame. XrCompositionLayerEquirectKHR is an alias type for the base struct XrCompositionLayerBaseHeader used in XrFrameEndInfo.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerProjection(3)

Name

XrCompositionLayerProjection - Composition layer for projection

C Specification

The XrCompositionLayerProjection structure is defined as:

typedef struct XrCompositionLayerProjection {
    XrStructureType                            type;
    const void*                                next;
    XrCompositionLayerFlags                    layerFlags;
    XrSpace                                    space;
    uint32_t                                   viewCount;
    const XrCompositionLayerProjectionView*    views;
} XrCompositionLayerProjection;

Members

Member Descriptions

Description

Note

Because a runtime may reproject the layer over time, a projection layer should specify an XrSpace in which to maximize stability of the layer content. For example, a projection layer containing world-locked content should use an XrSpace which is also world-locked, such as the LOCAL or STAGE reference spaces. In the case that the projection layer should be head-locked, such as a heads up display, the VIEW reference space would provide the highest quality layer reprojection.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerProjectionView(3)

Name

XrCompositionLayerProjectionView - Projection layer element

C Specification

The XrCompositionLayerProjectionView structure is defined as:

typedef struct XrCompositionLayerProjectionView {
    XrStructureType        type;
    const void*            next;
    XrPosef                pose;
    XrFovf                 fov;
    XrSwapchainSubImage    subImage;
} XrCompositionLayerProjectionView;

Members

Member Descriptions

Description

The count and order of view poses submitted with XrCompositionLayerProjection must be the same order as that returned by xrLocateViews. The XrCompositionLayerProjectionView::pose and XrCompositionLayerProjectionView::fov should almost always derive from XrView::pose and XrView::fov as found in the xrLocateViews::views array. However, applications may submit an XrCompositionLayerProjectionView which has a different view or FOV than that from xrLocateViews. In this case, the runtime will map the view and FOV to the system display appropriately. In the case that two submitted views within a single layer overlap, they must be composited in view array order.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrCompositionLayerQuad(3)

Name

XrCompositionLayerQuad - Quad composition layer

C Specification

The XrCompositionLayerQuad structure defined as:

typedef struct XrCompositionLayerQuad {
    XrStructureType            type;
    const void*                next;
    XrCompositionLayerFlags    layerFlags;
    XrSpace                    space;
    XrEyeVisibility            eyeVisibility;
    XrSwapchainSubImage        subImage;
    XrPosef                    pose;
    XrExtent2Df                size;
} XrCompositionLayerQuad;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • layerFlags is a bitmask of XrCompositionLayerFlagBits describing flags to apply to the layer.

  • space is the XrSpace in which the pose of the quad layer is evaluated over time.

  • eyeVisibility is the XrEyeVisibility for this layer.

  • subImage is the image layer XrSwapchainSubImage to use.

  • pose is an XrPosef defining the position and orientation of the quad in the reference frame of the space.

  • size is the width and and height of the quad in meters.

Description

The XrCompositionLayerQuad layer is useful for user interface elements or 2D content rendered into the virtual world. The layer’s XrSwapchainSubImage::swapchain image is applied to a quad in the virtual world space. Only front face of the quad surface is visible; the back face is not visible and must not be drawn by the runtime. A quad layer has no thickness; it is a two-dimensional object positioned and oriented in 3D space. The position of a quad refers to the center of the quad within the given XrSpace. The orientation of the quad refers to the orientation of the normal vector from the front face. The size of a quad refers to the quad’s size in the x-y plane of the given XrSpace’s coordinate system. A quad with a position of {0,0,0}, rotation of {0,0,0,1} (no rotation), and a size of {1,1} refers to a 1 meter x 1 meter quad centered at {0,0,0} with its front face normal vector coinciding with the +z axis.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrDebugUtilsLabelEXT(3)

Name

XrDebugUtilsLabelEXT - Debug Utils Label

C Specification

typedef struct XrDebugUtilsLabelEXT {
    XrStructureType    type;
    const void*        next;
    const char*        labelName;
} XrDebugUtilsLabelEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • labelName is a NULL terminated UTF-8 string specifying the label name.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrDebugUtilsMessengerCallbackDataEXT(3)

Name

XrDebugUtilsMessengerCallbackDataEXT - Debug utils messenger callback data

C Specification

typedef struct XrDebugUtilsMessengerCallbackDataEXT {
    XrStructureType                   type;
    const void*                       next;
    const char*                       messageId;
    const char*                       functionName;
    const char*                       message;
    uint32_t                          objectCount;
    XrDebugUtilsObjectNameInfoEXT*    objects;
    uint32_t                          sessionLabelCount;
    XrDebugUtilsLabelEXT*             sessionLabels;
} XrDebugUtilsMessengerCallbackDataEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • messageId is a NULL terminated string that identifies the message in a unique way. If the callback is triggered by a validation layer, this string corresponds the Valid Usage ID (VUID) that can be used to jump to the appropriate location in the OpenXR specification. This value may be NULL if no unique message identifier is associated with the message.

  • functionName is a NULL terminated string that identifies the OpenXR function that was executing at the time the message callback was triggered. This value may be NULL in cases where it is difficult to determine the originating OpenXR function.

  • message is a NULL terminated string detailing the trigger conditions.

  • objectCount is a count of items contained in the objects array. This may be 0.

  • objects is a pointer to an array of XrDebugUtilsObjectNameInfoEXT objects related to the detected issue. The array is roughly in order or importance, but the 0th element is always guaranteed to be the most important object for this message.

  • sessionLabelCount is a count of items contained in the sessionLabels array. This may be 0.

  • sessionLabels is a pointer to an array of XrDebugUtilsLabelEXT objects related to the detected issue. The array is roughly in order or importance, but the 0th element is always guaranteed to be the most important object for this message.

  • sessionLabels is NULL or a pointer to an array of XrDebugUtilsLabelEXT active in the current XrSession at the time the callback was triggered. Refer to Session Labels for more information.

Description

Valid Usage (Implicit)

An XrDebugUtilsMessengerCallbackDataEXT is a messenger object that handles passing along debug messages to a provided debug callback.

Note

This structure should only be considered valid during the lifetime of the triggered callback.

The labels listed inside sessionLabels are organized in time order, with the most recently generated label appearing first, and the oldest label appearing last.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrDebugUtilsMessengerCreateInfoEXT(3)

Name

XrDebugUtilsMessengerCreateInfoEXT - Debug utils messenger create info

C Specification

typedef struct XrDebugUtilsMessengerCreateInfoEXT {
    XrStructureType                         type;
    const void*                             next;
    XrDebugUtilsMessageSeverityFlagsEXT     messageSeverities;
    XrDebugUtilsMessageTypeFlagsEXT         messageTypes;
    PFN_xrDebugUtilsMessengerCallbackEXT    userCallback;
    void*                                   userData;
} XrDebugUtilsMessengerCreateInfoEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • messageSeverities is a bitmask of XrDebugUtilsMessageSeverityFlagBitsEXT specifying which severity of event(s) that will cause this callback to be called.

  • messageTypes is a combination of XrDebugUtilsMessageTypeFlagBitsEXT specifying which type of event(s) will cause this callback to be called.

  • userCallback is the application defined callback function to call.

  • userData is arbitrary user data to be passed to the callback.

Description

Valid Usage
  • userCallback must be a valid PFN_xrDebugUtilsMessengerCallbackEXT

Valid Usage (Implicit)

For each XrDebugUtilsMessengerEXT that is created the XrDebugUtilsMessengerCreateInfoEXT::messageSeverities and XrDebugUtilsMessengerCreateInfoEXT::messageTypes determine when that XrDebugUtilsMessengerCreateInfoEXT::userCallback is called. The process to determine if the user’s userCallback is triggered when an event occurs is as follows:

The callback will come directly from the component that detected the event, unless some other layer intercepts the calls for its own purposes (filter them in a different way, log to a system error log, etc.).

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrDebugUtilsObjectNameInfoEXT(3)

Name

XrDebugUtilsObjectNameInfoEXT - Debug utils object name info

C Specification

typedef struct XrDebugUtilsObjectNameInfoEXT {
    XrStructureType    type;
    const void*        next;
    XrObjectType       objectType;
    uint64_t           objectHandle;
    const char*        objectName;
} XrDebugUtilsObjectNameInfoEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • objectType is an XrObjectType specifying the type of the object to be named.

  • objectHandle is the object to be named.

  • objectName is a NULL terminated UTF-8 string specifying the name to apply to objectHandle.

Description

Valid Usage
  • If objectType is XR_OBJECT_TYPE_UNKNOWN, objectHandle must not be XR_NULL_HANDLE

  • If objectType is not XR_OBJECT_TYPE_UNKNOWN, objectHandle must be XR_NULL_HANDLE or an OpenXR handle of the type associated with objectType

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataBaseHeader(3)

Name

XrEventDataBaseHeader - Base header for an event

C Specification

The XrEventDataBaseHeader structure is defined as:

typedef struct XrEventDataBaseHeader {
    XrStructureType    type;
    const void*        next;
} XrEventDataBaseHeader;

Members

Parameter Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

Description

The XrEventDataBaseHeader is a generic structure used to identify the common event data elements.

Upon receipt, the XrEventDataBaseHeader pointer should be type-cast to a pointer of the appropriate event data based on the type parameter.

Valid Usage (Implicit)
  • type must be one of the following XrStructureType values: XR_TYPE_EVENT_DATA_EVENTS_LOST, XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING, XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED, XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT, XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING, XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED, XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR

  • next must be NULL or a valid pointer to the next structure in a structure chain

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataBuffer(3)

Name

XrEventDataBuffer - Event buffer

C Specification

The XrEventDataBuffer is a structure passed to xrPollEvent large enough to contain any returned event data element. The maximum size is specified by XR_MAX_EVENT_DATA_SIZE.

It is sufficient to clear the type and next parameters of an XrEventDataBuffer when passing it as an input to xrPollEvent.

An XrEventDataBuffer may be type-cast to an XrEventDataBaseHeader pointer or a pointer to any other appropriate event data based on the type parameter.

typedef struct XrEventDataBuffer {
    XrStructureType    type;
    const void*        next;
    uint8_t            varying[4000];
} XrEventDataBuffer;

Members

Parameter Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • varying is a fixed sized output buffer big enough to hold returned data elements for all specified event data types.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataEventsLost(3)

Name

XrEventDataEventsLost - Event indicating events were lost

C Specification

The XrEventDataEventsLost structure is defined as:

typedef struct XrEventDataEventsLost {
    XrStructureType    type;
    const void*        next;
    uint32_t           lostEventCount;
} XrEventDataEventsLost;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • lostEventCount is the number of events which have overflowed since the last call to xrPollEvent.

Description

Receiving the XrEventDataEventsLost event structure indicates that the event queue overflowed and some events were removed at the position within the queue at which this event was found.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataInstanceLossPending(3)

Name

XrEventDataInstanceLossPending - Event indicating instance loss will occur

C Specification

typedef struct XrEventDataInstanceLossPending {
    XrStructureType    type;
    const void*        next;
    XrTime             lossTime;
} XrEventDataInstanceLossPending;

Members

Receiving the XrEventDataInstanceLossPending event structure indicates that the application is about to lose the indicated XrInstance at the indicated lossTime in the future. The application should call xrDestroyInstance and relinquish any instance-specific resources. This typically occurs to make way for a replacement of the underlying runtime, such as via a software update.

Description

After the application has destroyed all of its instances and their children and waited past the specified time, it may then re-try xrCreateInstance in a loop waiting for whatever maintenance the runtime is performing to complete. The runtime will return XR_ERROR_INSTANCE_LOST from xrCreateInstance as long as it is unable to create the instance. Once the runtime has returned and is able to continue, it must resume returning XR_SUCCESS from xrCreateInstance if valid data is passed in.

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • lossTime is the absolute time at which the indicated instance will be considered lost and become unusable.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataInteractionProfileChanged(3)

Name

XrEventDataInteractionProfileChanged - Notifies the application than the active interaction profile has changed

C Specification

The XrEventDataInteractionProfileChanged structure is defined as:

typedef struct XrEventDataInteractionProfileChanged {
    XrStructureType    type;
    const void*        next;
    XrSession          session;
} XrEventDataInteractionProfileChanged;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • session is the XrSession for which at least one of the interaction profiles for a top level path has changed.

Description

The XrEventDataInteractionProfileChanged event is sent to the application to notify it that the active input form factor for one or more top level user paths has changed. This event must only be sent for interaction profiles that the application indicated its support for via xrSuggestInteractionProfileBindings. This event must only be sent for running sessions.

The application can call xrGetCurrentInteractionProfile if it wants to change its own behavior based on the active hardware.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataPerfSettingsEXT(3)

Name

XrEventDataPerfSettingsEXT - XrEventDataPerfSettingsEXT

C Specification

typedef struct XrEventDataPerfSettingsEXT {
    XrStructureType                       type;
    const void*                           next;
    XrPerfSettingsDomainEXT               domain;
    XrPerfSettingsSubDomainEXT            subDomain;
    XrPerfSettingsNotificationLevelEXT    fromLevel;
    XrPerfSettingsNotificationLevelEXT    toLevel;
} XrEventDataPerfSettingsEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • domain : processing domain in which a threshold has been crossed

  • subDomain : system area in which a threshold has been crossed

  • fromLevel : enumerated notification level which has been exited

  • toLevel : enumerated notification level which has been entered

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataReferenceSpaceChangePending(3)

Name

XrEventDataReferenceSpaceChangePending - Notifies the application that a reference space is changing

C Specification

The XrEventDataReferenceSpaceChangePending event is sent to the application to notify it that the origin (and perhaps the bounds) of a reference space is changing. This may occur due to the user recentering the space explicitly, or the runtime otherwise switching to a different space definition.

The reference space change must only take effect for xrLocateSpace or xrLocateViews calls whose XrTime parameter is greater than or equal to the changeTime provided in that event. Runtimes should provide a changeTime to applications that allows for a deep render pipeline to present frames that are already in flight using the previous definition of the space. Runtimes should choose a changeTime that is midway between the displayTime of future frames to avoid threshold issues with applications that calculate future frame times using displayPeriod.

The pose provided here must only describe the change in the natural origin of the reference space and must not incorporate any origin offsets specified by the application during calls to xrCreateReferenceSpace. If the runtime does not know the location of the space’s new origin relative to its previous origin, poseValid must be false, and the position and orientation of poseInPreviousSpace are undefined.

typedef struct XrEventDataReferenceSpaceChangePending {
    XrStructureType         type;
    const void*             next;
    XrSession               session;
    XrReferenceSpaceType    referenceSpaceType;
    XrTime                  changeTime;
    XrBool32                poseValid;
    XrPosef                 poseInPreviousSpace;
} XrEventDataReferenceSpaceChangePending;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • session is the XrSession for which the reference space is changing.

  • referenceSpaceType is the XrReferenceSpaceType that is changing.

  • changeTime is the target XrTime after which xrLocateSpace or xrLocateViews will return values that respect this change.

  • poseValid is true if the runtime can determine the pose of the new space in the previous space before the change.

  • poseInPreviousSpace is an XrPosef defining the position and orientation of the new reference space’s natural origin within the natural reference frame of its previous space.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataSessionStateChanged(3)

Name

XrEventDataSessionStateChanged - Event indicating session state changed

C Specification

The XrEventDataSessionStateChanged structure is defined as:

typedef struct XrEventDataSessionStateChanged {
     XrStructureType    type;
    const void*         next;
    XrSession           session;
    XrSessionState      state;
    XrTime              time;
} XrEventDataSessionStateChanged;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • session is the XrSession which has changed state.

  • state is the current XrSessionState of the session.

  • time is an XrTime which indicates the time of the state change.

Description

Receiving the XrEventDataSessionStateChanged event structure indicates that the application has changed lifecycle state.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEventDataVisibilityMaskChangedKHR(3)

Name

XrEventDataVisibilityMaskChangedKHR - Visibility Mask

C Specification

The XrEventDataVisibilityMaskChangedKHR structure specifies an event which indicates that a given view mask has changed. The application should respond to the event by calling xrGetVisibilityMaskKHR to retrieve the updated mask. This event is per-view, so if the masks for multiple views in a configuration change then multiple instances of this event will be sent to the application, one per view.

typedef struct XrEventDataVisibilityMaskChangedKHR {
    XrStructureType            type;
    const void*                next;
    XrSession                  session;
    XrViewConfigurationType    viewConfigurationType;
    uint32_t                   viewIndex;
} XrEventDataVisibilityMaskChangedKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • session is the XrSession for which the view mask has changed.

  • viewConfigurationType is the view configuration whose mask has changed.

  • viewIndex is the individual view within the view configuration to which the change refers.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrExtensionProperties(3)

Name

XrExtensionProperties - Returns properties of available instance extensions

C Specification

The XrExtensionProperties structure is defined as:

typedef struct XrExtensionProperties {
    XrStructureType    type;
    void*              next;
    char               extensionName[XR_MAX_EXTENSION_NAME_SIZE];
    uint32_t           extensionVersion;
} XrExtensionProperties;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • extensionName is a NULL terminated string specifying the name of the extension.

  • extensionVersion is the version of this extension. It is an integer, incremented with backward compatible changes.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrExtent2Df(3)

Name

XrExtent2Df - Extent in two dimensions

C Specification

A two-dimensional floating-point extent is defined by the structure:

typedef struct XrExtent2Df {
    float    width;
    float    height;
} XrExtent2Df;

Members

Member Descriptions
  • width the floating-point width of the extent.

  • height the floating-point height of the extent.

Description

This structure is used for component values that may be fractional (floating-point). If used to represent physical distances, values must be in meters.

The width and height value must be non-negative.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrExtent2Di(3)

Name

XrExtent2Di - Extent in two dimensions

C Specification

A two-dimensional integer extent is defined by the structure:

typedef struct XrExtent2Di {
    int32_t    width;
    int32_t    height;
} XrExtent2Di;

Members

Member Descriptions
  • width the integer width of the extent.

  • height the integer height of the extent.

Description

This variant is for representing discrete values such as texels. For representing physical distances, the floating-point variant must be used instead.

The width and height value must be non-negative.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFovf(3)

Name

XrFovf - Field of view

C Specification

Field of view (FoV) is defined by the structure:

typedef struct XrFovf {
    float    angleLeft;
    float    angleRight;
    float    angleUp;
    float    angleDown;
} XrFovf;

Members

Member Descriptions
  • angleLeft is the angle of the left side of the field of view. For a symmetric field of view this value is negative.

  • angleRight is the angle of the right side of the field of view.

  • angleUp is the angle of the top part of the field of view.

  • angleDown is the angle of the bottom part of the field of view. For a symmetric field of view this value is negative.

Description

Angles to the right of the center and upwards from the center are positive, and angles to the left of the center and down from the center are negative. The total horizontal field of view is angleRight minus angleLeft, and the total vertical field of view is angleUp minus angleDown. For a symmetric FoV, angleRight and angleUp will have positive values, angleLeft will be -angleRight, and angleDown will be -angleUp.

The angles must be specified in radians, and must be between -π/2 and π/2 exclusively.

When angleLeft > angleRight, the content of the view must be flipped horizontally. When angleDown > angleUp, the content of the view must be flipped vertically.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFrameBeginInfo(3)

Name

XrFrameBeginInfo - Begin frame information

C Specification

The XrFrameBeginInfo structure is defined as:

typedef struct XrFrameBeginInfo {
    XrStructureType    type;
    const void*        next;
} XrFrameBeginInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

Description

Because this structure only exists to support extension-specific structures, xrBeginFrame will accept a NULL argument for frameBeginInfo for applications that are not using any relevant extensions.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFrameEndInfo(3)

Name

XrFrameEndInfo - End frame information

C Specification

The XrFrameEndInfo structure is defined as:

typedef struct XrFrameEndInfo {
    XrStructureType                               type;
    const void*                                   next;
    XrTime                                        displayTime;
    XrEnvironmentBlendMode                        environmentBlendMode;
    uint32_t                                      layerCount;
    const XrCompositionLayerBaseHeader* const*    layers;
} XrFrameEndInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • displayTime is the XrTime at which this frame should be displayed.

  • environmentBlendMode is the XrEnvironmentBlendMode value representing the desired environment blend mode for this frame.

  • layerCount is the number of composition layers in this frame. The maximum supported layer count is identified by XrSystemGraphicsProperties::maxLayerCount. If layerCount is greater than the maximum supported layer count then XR_ERROR_LAYER_LIMIT_EXCEEDED must be returned.

  • layers is a pointer to an array of XrCompositionLayerBaseHeader pointers.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFrameState(3)

Name

XrFrameState - Frame prediction structure

C Specification

The XrFrameState structure is defined as:

typedef struct XrFrameState {
    XrStructureType    type;
    void*              next;
    XrTime             predictedDisplayTime;
    XrDuration         predictedDisplayPeriod;
    XrBool32           shouldRender;
} XrFrameState;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • predictedDisplayTime is the anticipated display XrTime for the next application-generated frame.

  • predictedDisplayPeriod is the XrDuration of the display period for the next application-generated frame, for use in predicting display times beyond the next one.

  • shouldRender is XR_TRUE if the application should render its layers as normal and submit them to xrEndFrame. When this value is XR_FALSE, the application should avoid heavy GPU work where possible, for example by skipping layer rendering and then omitting those layers when calling xrEndFrame.

Description

XrFrameState describes the time at which the next frame will be displayed to the user. predictedDisplayTime must refer to the midpoint of the interval during which the frame is displayed. The runtime may report a different predictedDisplayPeriod from the hardware’s refresh cycle.

For any frame where shouldRender is XR_FALSE, the application should avoid heavy GPU work for that frame, for example by not rendering its layers. This typically happens when the application is transitioning into or out of a running session, or when some system UI is fully covering the application at the moment. As long as the session is running, the application should keep running the frame loop to maintain the frame synchronization to the runtime, even if this requires calling xrEndFrame with all layers omitted.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFrameWaitInfo(3)

Name

XrFrameWaitInfo - Wait frame information structure

C Specification

The XrFrameWaitInfo structure is defined as:

typedef struct XrFrameWaitInfo {
    XrStructureType    type;
    const void*        next;
} XrFrameWaitInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

Description

Because this structure only exists to support extension-specific structures, xrWaitFrame must accept a NULL argument for frameWaitInfo for applications that are not using any relevant extensions.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingD3D11KHR(3)

Name

XrGraphicsBindingD3D11KHR - The graphics binding structure to be passed at session creation to use D3D11

C Specification

The XrGraphicsBindingD3D11KHR structure is defined as:

typedef struct XrGraphicsBindingD3D11KHR {
    XrStructureType    type;
    const void*        next;
    ID3D11Device*      device;
} XrGraphicsBindingD3D11KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • device is a pointer to a valid ID3D11Device to use.

Description

When creating a D3D11-backed XrSession, the application will provide a pointer to an XrGraphicsBindingD3D11KHR in the next chain of the XrSessionCreateInfo.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingD3D12KHR(3)

Name

XrGraphicsBindingD3D12KHR - The graphics binding structure to be passed at session creation to use D3D12

C Specification

The XrGraphicsBindingD3D12KHR structure is defined as:

typedef struct XrGraphicsBindingD3D12KHR {
    XrStructureType        type;
    const void*            next;
    ID3D12Device*          device;
    ID3D12CommandQueue*    queue;
} XrGraphicsBindingD3D12KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • device is a pointer to a valid ID3D12Device to use.

  • queue is a pointer to a valid ID3D12CommandQueue to use.

Description

When creating a D3D12-backed XrSession, the application will provide a pointer to an XrGraphicsBindingD3D12KHR in the next chain of the XrSessionCreateInfo.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingOpenGLESAndroidKHR(3)

Name

XrGraphicsBindingOpenGLESAndroidKHR - The graphics binding structure to be passed at session creation to use OpenGL ES on Android

C Specification

The XrGraphicsBindingOpenGLESAndroidKHR structure is defined as:

typedef struct XrGraphicsBindingOpenGLESAndroidKHR {
    XrStructureType    type;
    const void*        next;
    EGLDisplay         display;
    EGLConfig          config;
    EGLContext         context;
} XrGraphicsBindingOpenGLESAndroidKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • display is a valid Android OpenGL ES EGLDisplay.

  • config is a valid Android OpenGL ES EGLConfig.

  • context is a valid Android OpenGL ES EGLContext.

Description

When creating an OpenGL ES-backed XrSession on Android, the application will provide a pointer to an XrGraphicsBindingOpenGLESAndroidKHR structure in the next chain of the XrSessionCreateInfo.

The required window system configuration define to expose this structure type is XR_USE_PLATFORM_ANDROID.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingOpenGLWaylandKHR(3)

Name

XrGraphicsBindingOpenGLWaylandKHR - The graphics binding structure to be passed at session creation to use OpenGL on Wayland

C Specification

The XrGraphicsBindingOpenGLWaylandKHR structure is defined as:

typedef struct XrGraphicsBindingOpenGLWaylandKHR {
    XrStructureType       type;
    const void*           next;
    struct wl_display*    display;
} XrGraphicsBindingOpenGLWaylandKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • display is a valid Wayland wl_display.

Description

When creating an OpenGL-backed XrSession on any Linux/Unix platform that utilizes the Wayland protocol with its compositor, the application will provide a pointer to an XrGraphicsBindingOpenGLWaylandKHR in the next chain of the XrSessionCreateInfo.

The required window system configuration define to expose this structure type is XR_USE_PLATFORM_WAYLAND.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingOpenGLWin32KHR(3)

Name

XrGraphicsBindingOpenGLWin32KHR - The graphics binding structure to be passed at session creation to use OpenGL on Windows

C Specification

The XrGraphicsBindingOpenGLWin32KHR structure is defined as:

typedef struct XrGraphicsBindingOpenGLWin32KHR {
    XrStructureType    type;
    const void*        next;
    HDC                hDC;
    HGLRC              hGLRC;
} XrGraphicsBindingOpenGLWin32KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • hDC is a valid Windows HW device context handle.

  • hGLRC is a valid Windows OpenGL rendering context handle.

Description

When creating an OpenGL-backed XrSession on Microsoft Windows, the application will provide a pointer to an XrGraphicsBindingOpenGLWin32KHR in the next chain of the XrSessionCreateInfo. As no standardized way exists for OpenGL to create the graphics context on a specific GPU, the runtime must assume that the application uses the operating systems default GPU. If the GPU used by the runtime does not match the GPU on which the OpenGL context of the application got created, xrCreateSession must return XR_ERROR_GRAPHICS_DEVICE_INVALID.

The required window system configuration define to expose this structure type is XR_USE_PLATFORM_WIN32.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingOpenGLXcbKHR(3)

Name

XrGraphicsBindingOpenGLXcbKHR - The graphics binding structure to be passed at session creation to use OpenGL on X11 via XCB

C Specification

The XrGraphicsBindingOpenGLXcbKHR structure is defined as:

typedef struct XrGraphicsBindingOpenGLXcbKHR {
    XrStructureType       type;
    const void*           next;
    xcb_connection_t*     connection;
    uint32_t              screenNumber;
    xcb_glx_fbconfig_t    fbconfigid;
    xcb_visualid_t        visualid;
    xcb_glx_drawable_t    glxDrawable;
    xcb_glx_context_t     glxContext;
} XrGraphicsBindingOpenGLXcbKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • connection is a valid xcb_connection_t.

  • screenNumber is an index indicating which screen should be used for rendering.

  • fbconfigid is a valid XCB OpenGL GLX xcb_glx_fbconfig_t.

  • visualid is a valid XCB OpenGL GLX xcb_visualid_t.

  • glxDrawable is a valid XCB OpenGL GLX xcb_glx_drawable_t.

  • glxContext is a valid XCB OpenGL GLX xcb_glx_context_t.

Description

When creating an OpenGL-backed XrSession on any Linux/Unix platform that utilizes X11 and GLX, via the Xlib library, the application will provide a pointer to an XrGraphicsBindingOpenGLXcbKHR in the next chain of the XrSessionCreateInfo.

The required window system configuration define to expose this structure type is XR_USE_PLATFORM_XCB.

Valid Usage (Implicit)
  • The [XR_KHR_opengl_enable] extension must be enabled prior to using XrGraphicsBindingOpenGLXcbKHR

  • type must be XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • connection must be a pointer to an xcb_connection_t value

  • fbconfigid must be a valid xcb_glx_fbconfig_t value

  • visualid must be a valid xcb_visualid_t value

  • glxDrawable must be a valid xcb_glx_drawable_t value

  • glxContext must be a valid xcb_glx_context_t value

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingOpenGLXlibKHR(3)

Name

XrGraphicsBindingOpenGLXlibKHR - The graphics binding structure to be passed at session creation to use OpenGL on X11 via Xlib

C Specification

The XrGraphicsBindingOpenGLXlibKHR structure is defined as:

typedef struct XrGraphicsBindingOpenGLXlibKHR {
    XrStructureType    type;
    const void*        next;
    Display*           xDisplay;
    uint32_t           visualid;
    GLXFBConfig        glxFBConfig;
    GLXDrawable        glxDrawable;
    GLXContext         glxContext;
} XrGraphicsBindingOpenGLXlibKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • xDisplay is a valid X11 Display.

  • visualid is a valid X11 visual identifier.

  • glxFBConfig is a valid X11 OpenGL GLX GLXFBConfig.

  • glxDrawable is a valid X11 OpenGL GLX GLXDrawable.

  • glxContext is a valid X11 OpenGL GLX GLXContext.

Description

When creating an OpenGL-backed XrSession on any Linux/Unix platform that utilizes X11 and GLX, via the Xlib library, the application will provide a pointer to an XrGraphicsBindingOpenGLXlibKHR in the next chain of the XrSessionCreateInfo.

The required window system configuration define to expose this structure type is XR_USE_PLATFORM_XLIB.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsBindingVulkanKHR(3)

Name

XrGraphicsBindingVulkanKHR - The graphics binding structure to be passed at session creation to use Vulkan

C Specification

The XrGraphicsBindingVulkanKHR structure is defined as:

typedef struct XrGraphicsBindingVulkanKHR {
    XrStructureType     type;
    const void*         next;
    VkInstance          instance;
    VkPhysicalDevice    physicalDevice;
    VkDevice            device;
    uint32_t            queueFamilyIndex;
    uint32_t            queueIndex;
} XrGraphicsBindingVulkanKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • instance is a valid Vulkan VkInstance.

  • physicalDevice is a valid Vulkan VkPhysicalDevice.

  • device is a valid Vulkan VkDevice.

  • queueFamilyIndex is a valid queue family index on device.

  • queueIndex is a valid queue index on device to be used for synchronization.

Description

When creating a Vulkan-backed XrSession, the application will provide a pointer to an XrGraphicsBindingVulkanKHR in the next chain of the XrSessionCreateInfo.

Valid Usage
Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsRequirementsD3D11KHR(3)

Name

XrGraphicsRequirementsD3D11KHR - D3D11 feature level and LUID requirements

C Specification

The XrGraphicsRequirementsD3D11KHR structure is defined as:

typedef struct XrGraphicsRequirementsD3D11KHR {
    XrStructureType      type;
    void*                next;
    LUID                 adapterLuid;
    D3D_FEATURE_LEVEL    minFeatureLevel;
} XrGraphicsRequirementsD3D11KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • adapterLuid identifies what graphics device needs to be used.

  • minFeatureLevel is the minimum feature level that the D3D11 device must be initialized with.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsRequirementsD3D12KHR(3)

Name

XrGraphicsRequirementsD3D12KHR - D3D12 feature level and LUID requirements

C Specification

The XrGraphicsRequirementsD3D12KHR structure is defined as:

typedef struct XrGraphicsRequirementsD3D12KHR {
    XrStructureType      type;
    void*                next;
    LUID                 adapterLuid;
    D3D_FEATURE_LEVEL    minFeatureLevel;
} XrGraphicsRequirementsD3D12KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • adapterLuid identifies what graphics device needs to be used.

  • minFeatureLevel is the minimum feature level that the D3D12 device must be initialized with.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsRequirementsOpenGLESKHR(3)

Name

XrGraphicsRequirementsOpenGLESKHR - OpenGL ES API version requirements

C Specification

The XrGraphicsRequirementsOpenGLESKHR structure is defined as:

typedef struct XrGraphicsRequirementsOpenGLESKHR {
    XrStructureType    type;
    void*              next;
    XrVersion          minApiVersionSupported;
    XrVersion          maxApiVersionSupported;
} XrGraphicsRequirementsOpenGLESKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • minApiVersionSupported is the minimum version of OpenGL ES that the runtime supports. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

  • maxApiVersionSupported is the maximum version of OpenGL ES that the runtime has been tested on and is known to support. Newer OpenGL ES versions might work if they are compatible. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

Description

XrGraphicsRequirementsOpenGLESKHR is populated by xrGetOpenGLESGraphicsRequirementsKHR with the runtime’s OpenGL ES API version requirements.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsRequirementsOpenGLKHR(3)

Name

XrGraphicsRequirementsOpenGLKHR - OpenGL API version requirements

C Specification

The XrGraphicsRequirementsOpenGLKHR structure is defined as:

typedef struct XrGraphicsRequirementsOpenGLKHR {
    XrStructureType    type;
    void*              next;
    XrVersion          minApiVersionSupported;
    XrVersion          maxApiVersionSupported;
} XrGraphicsRequirementsOpenGLKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • minApiVersionSupported is the minimum version of OpenGL that the runtime supports. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

  • maxApiVersionSupported is the maximum version of OpenGL that the runtime has been tested on and is known to support. Newer OpenGL versions might work if they are compatible. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

Description

XrGraphicsRequirementsOpenGLKHR is populated by xrGetOpenGLGraphicsRequirementsKHR with the runtime’s OpenGL API version requirements.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrGraphicsRequirementsVulkanKHR(3)

Name

XrGraphicsRequirementsVulkanKHR - Vulkan API version requirements

C Specification

The XrGraphicsRequirementsVulkanKHR structure is defined as:

typedef struct XrGraphicsRequirementsVulkanKHR {
    XrStructureType    type;
    void*              next;
    XrVersion          minApiVersionSupported;
    XrVersion          maxApiVersionSupported;
} XrGraphicsRequirementsVulkanKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • minApiVersionSupported is the minimum version of Vulkan that the runtime supports. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

  • maxApiVersionSupported is the maximum version of Vulkan that the runtime has been tested on and is known to support. Newer Vulkan versions might work if they are compatible. Uses XR_MAKE_VERSION on major and minor API version, ignoring any patch version component.

Description

XrGraphicsRequirementsVulkanKHR is populated by xrGetVulkanGraphicsRequirementsKHR with the runtime’s Vulkan API version requirements.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrHapticActionInfo(3)

Name

XrHapticActionInfo - Information to output haptic feedback

C Specification

The XrHapticActionInfo structure is used to provide action and subaction paths when calling xr*HapticFeedback function. It is defined as:

typedef struct XrHapticActionInfo {
    XrStructureType    type;
    const void*        next;
    XrAction           action;
    XrPath             subactionPath;
} XrHapticActionInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • action is the XrAction handle for the desired output haptic action.

  • subactionPath is the subaction path XrPath of the device to send the haptic event to, or XR_NULL_PATH to specify all subaction paths. If the subaction path is specified, it is one of the subaction paths that were specified when the action was created. If the subaction path was not specified when the action was created, the runtime must return XR_ERROR_PATH_UNSUPPORTED. If this parameter is specified, the runtime must trigger the haptic events only on the device from the subaction path.

Description

See XrActionCreateInfo for a description of subaction paths, and the restrictions on their use.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrHapticBaseHeader(3)

Name

XrHapticBaseHeader - Base header for haptic feedback

C Specification

The XrHapticBaseHeader structure is defined as:

typedef struct XrHapticBaseHeader {
    XrStructureType    type;
    const void*        next;
} XrHapticBaseHeader;

Members

Member Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrHapticVibration(3)

Name

XrHapticVibration - Base header for haptic feedback

C Specification

The XrHapticVibration structure is defined as:

typedef struct XrHapticVibration {
    XrStructureType    type;
    const void*        next;
    XrDuration         duration;
    float              frequency;
    float              amplitude;
} XrHapticVibration;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • duration is the number of nanoseconds the vibration should last. If XR_MIN_HAPTIC_DURATION is specified, the runtime must produce a short haptics pulse of minimal supported duration for the haptic device.

  • frequency is the frequency of the vibration in Hz. If XR_FREQUENCY_UNSPECIFIED is specified, it is left to the runtime to decide the optimal frequency value to use.

  • amplitude is the amplitude of the vibration between 0.0 and 1.0.

Description

The XrHapticVibration is used in calls to xrApplyHapticFeedback that trigger vibration output actions.

The duration, and frequency parameters may be clamped to implementation-dependent ranges.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInputSourceLocalizedNameGetInfo(3)

Name

XrInputSourceLocalizedNameGetInfo - Information to query the bound input sources for an action

C Specification

The XrInputSourceLocalizedNameGetInfo structure is defined as:

typedef struct XrInputSourceLocalizedNameGetInfo {
    XrStructureType                    type;
    const void*                        next;
    XrPath                             sourcePath;
    XrInputSourceLocalizedNameFlags    whichComponents;
} XrInputSourceLocalizedNameGetInfo;

Members

Member Descriptions

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInstanceCreateInfo(3)

Name

XrInstanceCreateInfo - Structure specifying params of a newly created instance

C Specification

The XrInstanceCreateInfo structure is defined as:

typedef struct XrInstanceCreateInfo {
    XrStructureType          type;
    const void*              next;
    XrInstanceCreateFlags    createFlags;
    XrApplicationInfo        applicationInfo;
    uint32_t                 enabledApiLayerCount;
    const char* const*       enabledApiLayerNames;
    uint32_t                 enabledExtensionCount;
    const char* const*       enabledExtensionNames;
} XrInstanceCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • createFlags is a bitmask of XrInstanceCreateFlags that identifies options that apply to the creation.

  • applicationInfo is an instance of XrApplicationInfo. This information helps runtimes recognize behavior inherent to classes of applications. XrApplicationInfo is defined in detail below.

  • enabledApiLayerCount is the number of global API layers to enable.

  • enabledApiLayerNames is a pointer to an array of enabledApiLayerCount strings containing the names of API layers to enable for the created instance. See the API Layers And Extensions section for further details.

  • enabledExtensionCount is the number of global extensions to enable.

  • enabledExtensionNames is a pointer to an array of enabledExtensionCount strings containing the names of extensions to enable.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInstanceCreateInfoAndroidKHR(3)

Name

XrInstanceCreateInfoAndroidKHR - Creates an OpenXR Instance

C Specification

The XrInstanceCreateInfoAndroidKHR structure is defined as:

typedef struct XrInstanceCreateInfoAndroidKHR {
    XrStructureType    type;
    const void*        next;
    void*              applicationVM;
    void*              applicationActivity;
} XrInstanceCreateInfoAndroidKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • applicationVM is a pointer to the JNI’s opaque JavaVM structure, cast to a void pointer.

  • applicationActivity is a JNI reference to an android.app.Activity that will drive the session lifecycle of this instance, cast to a void pointer.

Description

XrInstanceCreateInfoAndroidKHR contains additional Android specific information needed when calling xrCreateInstance. The applicationVM field should be populated with the JavaVM structure received by the JNI_OnLoad function, while the applicationActivity field will typically contain a reference to a Java activity object received through an application-specific native method. The XrInstanceCreateInfoAndroidKHR structure must be provided in the next chain of the XrInstanceCreateInfo structure when calling xrCreateInstance.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInstanceProperties(3)

Name

XrInstanceProperties - Contains information about the instance

C Specification

The XrInstanceProperties structure is defined as:

typedef struct XrInstanceProperties {
    XrStructureType    type;
    void*              next;
    XrVersion          runtimeVersion;
    char               runtimeName[XR_MAX_RUNTIME_NAME_SIZE];
} XrInstanceProperties;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • runtimeVersion is the runtime’s version (not necessarily related to an OpenXR API version), expressed in the format of XR_MAKE_VERSION.

  • runtimeName is the name of the runtime.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInteractionProfileState(3)

Name

XrInteractionProfileState - Receives active interaction profile for a top level path

C Specification

The XrInteractionProfileState structure is defined as:

typedef struct XrInteractionProfileState {
    XrStructureType    type;
    void*              next;
    XrPath             interactionProfile;
} XrInteractionProfileState;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • interactionProfile is the XrPath of the interaction profile path for the topLevelUserPath used to retrieve this state, or XR_PATH_NULL if there is no active interaction profile at that top level user path.

Description

The runtime must only include interaction profiles that the application has provided bindings for via xrSuggestInteractionProfileBindings or XR_PATH_NULL. If the runtime is rebinding an interaction profile provided by the application to a device that the application did not provide bindings for, it must return the interaction profile path that it is emulating. If the runtime is unable to provide input because it cannot emulate any of the application-provided interaction profiles, it must return XR_PATH_NULL.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrInteractionProfileSuggestedBinding(3)

Name

XrInteractionProfileSuggestedBinding - Suggested bindings for a interaction profile

C Specification

The XrInteractionProfileSuggestedBinding structure is defined as:

typedef struct XrInteractionProfileSuggestedBinding {
    XrStructureType                    type;
    const void*                        next;
    XrPath                             interactionProfile;
    uint32_t                           countSuggestedBindings;
    const XrActionSuggestedBinding*    suggestedBindings;
} XrInteractionProfileSuggestedBinding;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • interactionProfile is the XrPath of an interaction profile.

  • countSuggestedBindings is the number of suggested bindings in the array pointed to by suggestedBindings.

  • suggestedBindings is a pointer to an array of XrActionSuggestedBinding structures that define all of the application’s suggested bindings for the specified interaction profile.

Description

Valid Usage (Implicit)
  • type must be XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • suggestedBindings must be a pointer to an array of countSuggestedBindings valid XrActionSuggestedBinding structures

  • The countSuggestedBindings parameter must be greater than 0

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrOffset2Df(3)

Name

XrOffset2Df - Float offset in two dimensions

C Specification

A floating-point offset is defined by the structure:

typedef struct XrOffset2Df {
    float    x;
    float    y;
} XrOffset2Df;

Members

Member Descriptions
  • x the floating-point offset in the x direction.

  • y the floating-point offset in the y direction.

Description

This structure is used for component values that may be fractional (floating-point). If used to represent physical distances, values must be in meters.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrOffset2Di(3)

Name

XrOffset2Di - Offset in two dimensions

C Specification

An integer offset is defined by the structure:

typedef struct XrOffset2Di {
    int32_t    x;
    int32_t    y;
} XrOffset2Di;

Members

Member Descriptions
  • x the integer offset in the x direction.

  • y the integer offset in the y direction.

Description

This variant is for representing discrete values such as texels. For representing physical distances, the floating-point variant must be used instead.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrPosef(3)

Name

XrPosef - Location and orientation in a space.

C Specification

A pose is defined by the XrPosef structure:

typedef struct XrPosef {
    XrQuaternionf    orientation;
    XrVector3f       position;
} XrPosef;

Members

Member Descriptions
  • orientation is an XrQuaternionf representing the orientation within a space.

  • position is an XrVector3f representing position within a space.

A construct representing a position and orientation within a space, with position expressed in meters, and orientation represented as a unit quaternion.

Description

A runtime must return XR_ERROR_POSE_INVALID if the orientation norm deviates by more than 1% from unit length.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrQuaternionf(3)

Name

XrQuaternionf - Unit Quaternion

C Specification

Rotation is represented by a unit quaternion defined by the XrQuaternionf structure:

typedef struct XrQuaternionf {
    float    x;
    float    y;
    float    z;
    float    w;
} XrQuaternionf;

Members

Member Descriptions
  • x is the x coordinate of the quaternion.

  • y is the y coordinate of the quaternion.

  • z is the z coordinate of the quaternion.

  • w is the w coordinate of the quaternion.

Description

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrRect2Df(3)

Name

XrRect2Df - Rect in two dimensions

C Specification

A rectangle with floating-point values is defined by the structure:

typedef struct XrRect2Df {
    XrOffset2Df    offset;
    XrExtent2Df    extent;
} XrRect2Df;

Members

Member Descriptions
  • offset is the XrOffset2Df specifying the rectangle offset.

  • extent is the XrExtent2Df specifying the rectangle extent.

Description

This structure is used for component values that may be fractional (floating-point).

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrRect2Di(3)

Name

XrRect2Di - Rect in two dimensions

C Specification

A rectangle with integer values is defined by the structure:

typedef struct XrRect2Di {
    XrOffset2Di    offset;
    XrExtent2Di    extent;
} XrRect2Di;

Members

Member Descriptions
  • offset is the XrOffset2Di specifying the integer rectangle offset.

  • extent is the XrExtent2Di specifying the integer rectangle extent.

Description

This variant is for representing discrete values such as texels. For representing physical distances, the floating-point variant must be used instead.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrReferenceSpaceCreateInfo(3)

Name

XrReferenceSpaceCreateInfo - Creation info for a reference space

C Specification

The XrReferenceSpaceCreateInfo structure is defined as:

typedef struct XrReferenceSpaceCreateInfo {
    XrStructureType         type;
    const void*             next;
    XrReferenceSpaceType    referenceSpaceType;
    XrPosef                 poseInReferenceSpace;
} XrReferenceSpaceCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • referenceSpaceType is the chosen XrReferenceSpaceType.

  • poseInReferenceSpace is an XrPosef defining the position and orientation of the new space’s origin within the natural reference frame of the reference space.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSessionActionSetsAttachInfo(3)

Name

XrSessionActionSetsAttachInfo - Information to attach action sets to a session

C Specification

The XrSessionActionSetsAttachInfo structure is defined as:

typedef struct XrSessionActionSetsAttachInfo {
    XrStructureType       type;
    const void*           next;
    uint32_t              countActionSets;
    const XrActionSet*    actionSets;
} XrSessionActionSetsAttachInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • countActionSets is an integer specifying the number of valid elements in the actionSets array.

  • actionSets is a pointer to an array of one or more XrActionSet handles to be attached to the session.

Description

Valid Usage (Implicit)
  • type must be XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • actionSets must be a pointer to an array of countActionSets valid XrActionSet handles

  • The countActionSets parameter must be greater than 0

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSessionBeginInfo(3)

Name

XrSessionBeginInfo - Struct containing session begin info

C Specification

The XrSessionBeginInfo structure is defined as:

typedef struct XrSessionBeginInfo {
    XrStructureType            type;
    const void*                next;
    XrViewConfigurationType    primaryViewConfigurationType;
} XrSessionBeginInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • primaryViewConfigurationType is the XrViewConfigurationType to use during this session to provide images for the form factor’s primary displays.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSessionCreateInfo(3)

Name

XrSessionCreateInfo - Creates a session

C Specification

The XrSessionCreateInfo structure is defined as:

typedef struct XrSessionCreateInfo {
    XrStructureType         type;
    const void*             next;
    XrSessionCreateFlags    createFlags;
    XrSystemId              systemId;
} XrSessionCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure. Note that in most cases one graphics API extension specific struct needs to be in this next chain.

  • createFlags identifies XrSessionCreateFlags that apply to the creation.

  • systemId is the XrSystemId representing the system of devices to be used by this session.

Description

Valid Usage
  • systemId must be a valid XrSystemId or XR_ERROR_SYSTEM_INVALID must be returned.

  • next, unless otherwise specified via an extension, must contain exactly one graphics API binding structure (a structure whose name begins with "XrGraphicsBinding") or XR_ERROR_GRAPHICS_DEVICE_INVALID must be returned.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpaceLocation(3)

Name

XrSpaceLocation - Contains info about a space

C Specification

The XrSpaceLocation structure is defined as:

typedef struct XrSpaceLocation {
    XrStructureType         type;
    void*                   next;
    XrSpaceLocationFlags    locationFlags;
    XrPosef                 pose;
} XrSpaceLocation;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure, such as XrSpaceVelocity.

  • locationFlags is a bitfield, with bit masks defined in XrSpaceLocationFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.

  • pose is an XrPosef defining the position and orientation of the origin of xrLocateSpace::space within the reference frame of xrLocateSpace::baseSpace.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpaceVelocity(3)

Name

XrSpaceVelocity - Contains info about a space

C Specification

The XrSpaceVelocity structure is defined as:

typedef struct XrSpaceVelocity {
    XrStructureType         type;
    void*                   next;
    XrSpaceVelocityFlags    velocityFlags;
    XrVector3f              linearVelocity;
    XrVector3f              angularVelocity;
} XrSpaceVelocity;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • velocityFlags is a bitfield, with bit masks defined in XrSpaceVelocityFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.

  • linearVelocity is the relative linear velocity of the origin of xrLocateSpace::space with respect to and expressed in the reference frame of xrLocateSpace::baseSpace, in units of meters per second.

  • angularVelocity is the relative angular velocity of xrLocateSpace::space with respect to xrLocateSpace::baseSpace. The vector’s direction is expressed in the reference frame of xrLocateSpace::baseSpace and is parallel to the rotational axis of xrLocateSpace::space. The vector’s magnitude is the relative angular speed of xrLocateSpace::space in radians per second. The vector follows the right-hand rule for torque/rotation.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpatialAnchorCreateInfoMSFT(3)

Name

XrSpatialAnchorCreateInfoMSFT - Information to create a spatial anchor

C Specification

The XrSpatialAnchorCreateInfoMSFT structure is defined as:

typedef struct XrSpatialAnchorCreateInfoMSFT {
    XrStructureType    type;
    const void*        next;
    XrSpace            space;
    XrPosef            pose;
    XrTime             time;
} XrSpatialAnchorCreateInfoMSFT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • space is a handle to the XrSpace in which pose is specified.

  • pose is the XrPosef within space at time that specifies the point in the real world used to initialize the new anchor.

  • time is the XrTime at which pose will be evaluated within space.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSpatialAnchorSpaceCreateInfoMSFT(3)

Name

XrSpatialAnchorSpaceCreateInfoMSFT - Information to create a space from a spatial anchor

C Specification

The XrSpatialAnchorSpaceCreateInfoMSFT structure is defined as:

typedef struct XrSpatialAnchorSpaceCreateInfoMSFT {
    XrStructureType        type;
    const void*            next;
    XrSpatialAnchorMSFT    anchor;
    XrPosef                poseInAnchorSpace;
} XrSpatialAnchorSpaceCreateInfoMSFT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • anchor is a handle to an XrSpatialAnchorMSFT previously created with xrCreateSpatialAnchorMSFT.

  • poseInAnchorSpace is an XrPosef defining the position and orientation of the new space’s origin relative to the anchor’s natural origin.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainCreateInfo(3)

Name

XrSwapchainCreateInfo - Creation info for a swapchain

C Specification

The XrSwapchainCreateInfo structure is defined as:

typedef struct XrSwapchainCreateInfo {
    XrStructureType           type;
    const void*               next;
    XrSwapchainCreateFlags    createFlags;
    XrSwapchainUsageFlags     usageFlags;
    int64_t                   format;
    uint32_t                  sampleCount;
    uint32_t                  width;
    uint32_t                  height;
    uint32_t                  faceCount;
    uint32_t                  arraySize;
    uint32_t                  mipCount;
} XrSwapchainCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • createFlags is a bitmask of XrSwapchainCreateFlagBits describing additional properties of the swapchain.

  • usageFlags is a bitmask of XrSwapchainUsageFlagBits describing the intended usage of the swapchain’s images. The usage flags define how the corresponding graphics API objects are created. A mismatch may result in swapchain images that do not support the application’s usage.

  • format is a graphics API-specific texture format identifier. For example, if the graphics API specified in xrCreateSession is Vulkan, then this format is a Vulkan format such as VK_FORMAT_R8G8B8A8_SRGB. The format identifies the format that the runtime will interpret the texture as upon submission. Valid formats are indicated by xrEnumerateSwapchainFormats.

  • sampleCount is the number of sub-data element samples in the image, must not be 0.

  • width is the width of the image, must not be 0.

  • height is the height of the image, must not be 0.

  • faceCount is the number of faces, which can be either 6 (for cubemaps) or 1.

  • arraySize is the number of array layers in the image or 1 for a 2D image, must not be zero.

  • mipCount describes the number of levels of detail available for minified sampling of the image, must not be 0.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageAcquireInfo(3)

Name

XrSwapchainImageAcquireInfo - Describes a swapchain image acquisition

C Specification

The XrSwapchainImageAcquireInfo structure is defined as:

typedef struct XrSwapchainImageAcquireInfo {
    XrStructureType    type;
    const void*        next;
} XrSwapchainImageAcquireInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

Description

Because this structure only exists to support extension-specific structures, xrAcquireSwapchainImage will accept a NULL argument for acquireInfo for applications that are not using any relevant extensions.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageBaseHeader(3)

Name

XrSwapchainImageBaseHeader - Image base header for a swapchain image

C Specification

The XrSwapchainImageBaseHeader structure is defined as:

typedef struct XrSwapchainImageBaseHeader {
    XrStructureType    type;
    void*              next;
} XrSwapchainImageBaseHeader;

Members

Member Descriptions
  • type is the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.

  • next is NULL or a pointer to an extension-specific structure.

Description

The XrSwapchainImageBaseHeader is a base structure that can be overridden by a graphics API-specific XrSwapchainImage* child structure.

Valid Usage (Implicit)
  • type must be one of the following XrStructureType values: XR_TYPE_SWAPCHAIN_IMAGE_D3D11_KHR, XR_TYPE_SWAPCHAIN_IMAGE_D3D12_KHR, XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR, XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR, XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR

  • next must be NULL or a valid pointer to the next structure in a structure chain

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageD3D11KHR(3)

Name

XrSwapchainImageD3D11KHR - D3D11-specific swapchain image structure

C Specification

The XrSwapchainImageD3D11KHR structure is defined as:

typedef struct XrSwapchainImageD3D11KHR {
     XrStructureType    type;
    void*               next;
    ID3D11Texture2D*    texture;
} XrSwapchainImageD3D11KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • texture is a pointer to a valid ID3D11Texture2D to use.

Description

If a given session was created with XrGraphicsBindingD3D11KHR, the following conditions must apply.

The OpenXR runtime must interpret the top-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing up, near Z plane at 0, and far Z plane at 1.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageD3D12KHR(3)

Name

XrSwapchainImageD3D12KHR - D3D12-specific swapchain image structure

C Specification

The XrSwapchainImageD3D12KHR structure is defined as:

typedef struct XrSwapchainImageD3D12KHR {
     XrStructureType    type;
    void*               next;
    ID3D12Resource*     texture;
} XrSwapchainImageD3D12KHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • texture is a pointer to a valid ID3D12Texture2D to use.

Description

If a given session was created with XrGraphicsBindingD3D12KHR, the following conditions must apply.

The OpenXR runtime must interpret the top-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing up, near Z plane at 0, and far Z plane at 1.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageOpenGLESKHR(3)

Name

XrSwapchainImageOpenGLESKHR - OpenGL ES-specific swapchain image structure

C Specification

The XrSwapchainImageOpenGLESKHR structure is defined as:

typedef struct XrSwapchainImageOpenGLESKHR {
    XrStructureType    type;
    void*              next;
    uint32_t           image;
} XrSwapchainImageOpenGLESKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • image is an index indicating the current OpenGL ES swapchain image to use.

Description

If a given session was created with a XrGraphicsBindingOpenGLES*KHR, the following conditions must apply.

The OpenXR runtime must interpret the bottom-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing up, near Z plane at -1, and far Z plane at 1.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageOpenGLKHR(3)

Name

XrSwapchainImageOpenGLKHR - OpenGL-specific swapchain image structure

C Specification

The XrSwapchainImageOpenGLKHR structure is defined as:

typedef struct XrSwapchainImageOpenGLKHR {
    XrStructureType    type;
    void*              next;
    uint32_t           image;
} XrSwapchainImageOpenGLKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • image is the OpenGL texture handle associated with this swapchain image.

Description

If a given session was created with a XrGraphicsBindingOpenGL*KHR, the following conditions must apply.

The OpenXR runtime must interpret the bottom-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing up, near Z plane at -1, and far Z plane at 1.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageReleaseInfo(3)

Name

XrSwapchainImageReleaseInfo - Describes a swapchain image release

C Specification

The XrSwapchainImageReleaseInfo structure is defined as:

typedef struct XrSwapchainImageReleaseInfo {
    XrStructureType    type;
    const void*        next;
} XrSwapchainImageReleaseInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

Description

Because this structure only exists to support extension-specific structures, xrReleaseSwapchainImage will accept a NULL argument for releaseInfo for applications that are not using any relevant extensions.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageVulkanKHR(3)

Name

XrSwapchainImageVulkanKHR - Vulkan-specific swapchain image structure

C Specification

The XrSwapchainImageVulkanKHR structure is defined as:

typedef struct XrSwapchainImageVulkanKHR {
    XrStructureType    type;
    void*              next;
    VkImage            image;
} XrSwapchainImageVulkanKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • image is a valid Vulkan VkImage to use.

Description

If a given session was created with XrGraphicsBindingVulkanKHR, the following conditions must apply.

The OpenXR runtime must interpret the top-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing down, near Z plane at 0, and far Z plane at 1.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainImageWaitInfo(3)

Name

XrSwapchainImageWaitInfo - Describes a swapchain image wait operation

C Specification

The XrSwapchainImageWaitInfo structure describes a swapchain image wait operation. It is defined as:

typedef struct XrSwapchainImageWaitInfo {
    XrStructureType    type;
    const void*        next;
    XrDuration         timeout;
} XrSwapchainImageWaitInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • timeout indicates how many nanoseconds the call should block waiting for the image to become available for writing.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSwapchainSubImage(3)

Name

XrSwapchainSubImage - Composition layer data

C Specification

The XrSwapchainSubImage structure is defined as:

typedef struct XrSwapchainSubImage {
    XrSwapchain    swapchain;
    XrRect2Di      imageRect;
    uint32_t       imageArrayIndex;
} XrSwapchainSubImage;

Members

Member Descriptions
  • swapchain is the XrSwapchain to be displayed.

  • imageRect is an XrRect2Di representing the valid portion of the image to use, in pixels. Note that the compositor may bleed in pixels from outside the bounds in some cases, for instance due to mipmapping.

  • imageArrayIndex is the image array index, with 0 meaning the first or only array element.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSystemGetInfo(3)

Name

XrSystemGetInfo - Specifies desired attributes of the system

C Specification

The XrSystemGetInfo structure is defined as:

typedef struct XrSystemGetInfo {
    XrStructureType    type;
    const void*        next;
    XrFormFactor       formFactor;
} XrSystemGetInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • formFactor is the XrFormFactor requested by the application.

Description

The XrSystemGetInfo structure specifies attributes about a system as desired by an application.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSystemGraphicsProperties(3)

Name

XrSystemGraphicsProperties - Graphics-related properties of a particular system

C Specification

The XrSystemGraphicsProperties structure is defined as:

typedef struct XrSystemGraphicsProperties {
    uint32_t    maxSwapchainImageHeight;
    uint32_t    maxSwapchainImageWidth;
    uint32_t    maxLayerCount;
} XrSystemGraphicsProperties;

Members

Member Descriptions
  • maxSwapchainImageHeight is the maximum swapchain image pixel height supported by this system.

  • maxSwapchainImageWidth is the maximum swapchain image pixel width supported by this system.

  • maxLayerCount is the maximum number of composition layers supported by this system. The runtime must support at least XR_MIN_COMPOSITION_LAYERS_SUPPORTED layers.

Description

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSystemProperties(3)

Name

XrSystemProperties - Properties of a particular system

C Specification

The XrSystemProperties structure is defined as:

typedef struct XrSystemProperties {
    XrStructureType               type;
    void*                         next;
    XrSystemId                    systemId;
    uint32_t                      vendorId;
    char                          systemName[XR_MAX_SYSTEM_NAME_SIZE];
    XrSystemGraphicsProperties    graphicsProperties;
    XrSystemTrackingProperties    trackingProperties;
} XrSystemProperties;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • vendorId is a unique identifier for the vendor of the system.

  • systemId is the XrSystemId identifying the system.

  • systemName is a string containing the name of the system.

  • graphicsProperties is an XrSystemGraphicsProperties structure specifying the system graphics properties.

  • trackingProperties is an XrSystemTrackingProperties structure specifying system tracking properties.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSystemTrackingProperties(3)

Name

XrSystemTrackingProperties - Tracking-related properties of a particular system

C Specification

The XrSystemTrackingProperties structure is defined as:

typedef struct XrSystemTrackingProperties {
    XrBool32    orientationTracking;
    XrBool32    positionTracking;
} XrSystemTrackingProperties;

Members

Member Descriptions
  • orientationTracking is set to XR_TRUE to indicate the system supports orientational tracking of the view pose(s), XR_FALSE otherwise.

  • positionTracking is set to XR_TRUE to indicate the system supports positional tracking of the view pose(s), XR_FALSE otherwise.

Description

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrVector2f(3)

Name

XrVector2f - Two-dimensional vector

C Specification

A two-dimensional vector is defined by the XrVector2f structure:

typedef struct XrVector2f {
    float    x;
    float    y;
} XrVector2f;

Members

Member Descriptions
  • x is the x coordinate of the vector.

  • y is the y coordinate of the vector.

Description

If used to represent physical distances (rather than e.g. normalized direction) and not otherwise specified, values must be in meters.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrVector3f(3)

Name

XrVector3f - Three-dimensional vector

C Specification

A three-dimensional vector is defined by the XrVector3f structure:

typedef struct XrVector3f {
    float    x;
    float    y;
    float    z;
} XrVector3f;

Members

Member Descriptions
  • x is the x coordinate of the vector.

  • y is the y coordinate of the vector.

  • z is the z coordinate of the vector.

Description

If used to represent physical distances (rather than e.g. velocity or angular velocity) and not otherwise specified, values must be in meters.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrVector4f(3)

Name

XrVector4f - Four-dimensional vector

C Specification

A four-dimensional or homogeneous vector is defined by the XrVector4f structure:

typedef struct XrVector4f {
    float    x;
    float    y;
    float    z;
    float    w;
} XrVector4f;

Members

Member Descriptions
  • x is the x coordinate of the vector.

  • y is the y coordinate of the vector.

  • z is the z coordinate of the vector.

  • w is the w coordinate of the vector.

Description

If used to represent physical distances, x, y, and z values must be in meters.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrView(3)

Name

XrView - Struct containing view projection state

C Specification

The XrView structure is defined as:

typedef struct XrView {
    XrStructureType    type;
    void*              next;
    XrPosef            pose;
    XrFovf             fov;
} XrView;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • pose is an XrPosef defining the location and orientation of the view in the space specified by the xrLocateViews function.

  • fov is the XrFovf for the four sides of the projection.

Description

The XrView structure contains view pose and projection state necessary to render a single projection view in the view configuration.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrViewConfigurationProperties(3)

Name

XrViewConfigurationProperties - Detailed configuration properties for an XrViewConfigurationProperties

C Specification

The XrViewConfigurationProperties structure is defined as:

typedef struct XrViewConfigurationProperties {
    XrStructureType            type;
    void*                      next;
    XrViewConfigurationType    viewConfigurationType;
    XrBool32                   fovMutable;
} XrViewConfigurationProperties;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • viewConfigurationType is the XrViewConfigurationType of the configuration.

  • fovMutable indicates if the view field of view can be modified by the application.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrViewConfigurationView(3)

Name

XrViewConfigurationView - Individual view configuration

C Specification

Each XrViewConfigurationView specifies properties related to rendering of an individual view within a view configuration.

The XrViewConfigurationView structure is defined as:

typedef struct XrViewConfigurationView {
    XrStructureType    type;
    void*              next;
    uint32_t           recommendedImageRectWidth;
    uint32_t           maxImageRectWidth;
    uint32_t           recommendedImageRectHeight;
    uint32_t           maxImageRectHeight;
    uint32_t           recommendedSwapchainSampleCount;
    uint32_t           maxSwapchainSampleCount;
} XrViewConfigurationView;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • recommendedImageRectWidth is the optimal width of imageRect to use when rendering this view into a swapchain.

  • maxImageRectWidth is the maximum width of imageRect supported when rendering this view into a swapchain.

  • recommendedImageRectHeight is the optimal height of imageRect to use when rendering this view into a swapchain.

  • maxImageRectHeight is the maximum height of imageRect supported when rendering this view into a swapchain.

  • recommendedSwapchainSampleCount is the recommended number of sub-data element samples to create for each swapchain image that will be rendered into for this view.

  • maxSwapchainSampleCount is the maximum number of sub-data element samples supported for swapchain images that will be rendered into for this view.

Description

See XrSwapchainSubImage for more information about imageRect values, and XrSwapchainCreateInfo for more information about creating swapchains appropriately sized to support those imageRect values.

The array of XrViewConfigurationView returned by the runtime must adhere to the rules defined in XrViewConfigurationType, such as the count and association to the left and right eyes.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrViewLocateInfo(3)

Name

XrViewLocateInfo - Struct containing view locate information

C Specification

The XrViewLocateInfo structure is defined as:

typedef struct XrViewLocateInfo {
    XrStructureType            type;
    const void*                next;
    XrViewConfigurationType    viewConfigurationType;
    XrTime                     displayTime;
    XrSpace                    space;
} XrViewLocateInfo;

Members

Member Descriptions
  • viewConfigurationType is XrViewConfigurationType to query for.

  • displayTime is the time for which the view poses are predicted.

  • space is the XrSpace in which the pose in each XrView is expressed.

Description

The XrViewLocateInfo structure contains the display time and space used to locate the view XrView structures.

The runtime must return error XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED if the given viewConfigurationType is not one of the supported type reported by xrEnumerateViewConfigurations.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrViewState(3)

Name

XrViewState - Struct containing additional view state

C Specification

The XrViewState structure is defined as:

typedef struct XrViewState {
    XrStructureType     type;
    void*               next;
    XrViewStateFlags    viewStateFlags;
} XrViewState;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • viewStateFlags is a bitmask of XrViewStateFlagBits indicating state for all views.

Description

The XrViewState contains additional view state from xrLocateViews common to all views of the active view configuration.

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrVisibilityMaskKHR(3)

Name

XrVisibilityMaskKHR - Visibility Mask

C Specification

The XrVisibilityMaskKHR structure is an input/output struct which specifies the view mask.

typedef struct XrVisibilityMaskKHR {
    XrStructureType    type;
    void*              next;
    uint32_t           vertexCapacityInput;
    uint32_t           vertexCountOutput;
    XrVector2f*        vertices;
    uint32_t           indexCapacityInput;
    uint32_t           indexCountOutput;
    uint32_t*          indices;
} XrVisibilityMaskKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • vertexCapacityInput is the capacity of the vertices array, or 0 to indicate a request to retrieve the required capacity.

  • vertexCountOutput is filled in by the runtime with the count of vertices written or the required capacity in the case that vertexCapacityInput or indexCapacityInput is 0.

  • vertices is an array of vertices filled in by the runtime that specifies mask coordinates in the z=-1 plane of the view.

  • indexCapacityInput is the capacity of the indices array, or 0 to indicate a request to retrieve the required capacity.

  • indexCountOutput is filled in by the runtime with the count of indices written or the required capacity in the case that vertexCapacityInput or indexCapacityInput is 0.

  • indices is an array of indices filled in by the runtime, specifying the indices of the mask geometry in the vertices array.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrVulkanSwapchainFormatListCreateInfoKHR(3)

Name

XrVulkanSwapchainFormatListCreateInfoKHR - A list of Vulkan view formats

C Specification

typedef struct XrVulkanSwapchainFormatListCreateInfoKHR {
    XrStructureType    type;
    const void*        next;
    uint32_t           viewFormatCount;
    const VkFormat*    viewFormats;
} XrVulkanSwapchainFormatListCreateInfoKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • viewFormatCount is the number of view formats passed in viewFormats.

  • viewFormats is an array of VkFormat.

Description

Valid Usage (Implicit)

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

Enumerations

XrActionType(3)

Name

XrActionType - XrAction type

C Specification

The XrActionType parameter takes one of the following values:

typedef enum XrActionType {
    XR_ACTION_TYPE_BOOLEAN_INPUT = 1,
    XR_ACTION_TYPE_FLOAT_INPUT = 2,
    XR_ACTION_TYPE_VECTOR2F_INPUT = 3,
    XR_ACTION_TYPE_POSE_INPUT = 4,
    XR_ACTION_TYPE_VIBRATION_OUTPUT = 100,
    XR_ACTION_TYPE_MAX_ENUM = 0x7FFFFFFF
} XrActionType;

Description

Enumerant Descriptions
  • XR_ACTION_TYPE_BOOLEAN_INPUT. The action can be passed to xrGetActionStateBoolean to retrieve a boolean value.

  • XR_ACTION_TYPE_FLOAT_INPUT. The action can be passed to xrGetActionStateFloat to retrieve a float value.

  • XR_ACTION_TYPE_VECTOR2F_INPUT. The action can be passed to xrGetActionStateVector2f to retrieve a 2D float vector.

  • XR_ACTION_TYPE_POSE_INPUT. The action can can be passed to xrCreateActionSpace to create a space.

  • XR_ACTION_TYPE_VIBRATION_OUTPUT. The action can be passed to xrApplyHapticFeedback to send a haptic event to the runtime.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrAndroidThreadTypeKHR(3)

Name

XrAndroidThreadTypeKHR - Enum describing Android thread types

C Specification

The possible thread types are specified by the XrAndroidThreadTypeKHR enumeration:

typedef enum XrAndroidThreadTypeKHR {
    XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR = 1,
    XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR = 2,
    XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR = 3,
    XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR = 4,
    XR_ANDROID_THREAD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
} XrAndroidThreadTypeKHR;

Description

Enumerants
  • XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR
    hints the XR runtime that the thread is doing background CPU tasks

  • XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR
    hints the XR runtime that the thread is doing time critical CPU tasks

  • XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR
    hints the XR runtime that the thread is doing background graphics device tasks

  • XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR
    hints the XR runtime that the thread is doing time critical graphics device tasks

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEnvironmentBlendMode(3)

Name

XrEnvironmentBlendMode - Environment blend modes

C Specification

The possible blend modes are specified by the XrEnvironmentBlendMode enumeration:

typedef enum XrEnvironmentBlendMode {
    XR_ENVIRONMENT_BLEND_MODE_OPAQUE = 1,
    XR_ENVIRONMENT_BLEND_MODE_ADDITIVE = 2,
    XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND = 3,
    XR_ENVIRONMENT_BLEND_MODE_MAX_ENUM = 0x7FFFFFFF
} XrEnvironmentBlendMode;

Description

Enumerant Descriptions
  • XR_ENVIRONMENT_BLEND_MODE_OPAQUE. The composition layers will be displayed with no view of the physical world behind them. The composited image will be interpreted as an RGB image, ignoring the composited alpha channel. This is the typical mode for VR experiences, although this mode can also be supported on devices that support video passthrough.

  • XR_ENVIRONMENT_BLEND_MODE_ADDITIVE. The composition layers will be additively blended with the real world behind the display. The composited image will be interpreted as an RGB image, ignoring the composited alpha channel during the additive blending. This will cause black composited pixels to appear transparent. This is the typical mode for an AR experience on a see-through headset with an additive display, although this mode can also be supported on devices that support video passthrough.

  • XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND. The composition layers will be alpha-blended with the real world behind the display. The composited image will be interpreted as an RGBA image, with the composited alpha channel determining each pixel’s level of blending with the real world behind the display. This is the typical mode for an AR experience on a phone or headset that supports video passthrough.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrEyeVisibility(3)

Name

XrEyeVisibility - Eye visibility selector

C Specification

The XrEyeVisibility enum selects which of the viewer’s eyes to display a layer to:

typedef enum XrEyeVisibility {
    XR_EYE_VISIBILITY_BOTH = 0,
    XR_EYE_VISIBILITY_LEFT = 1,
    XR_EYE_VISIBILITY_RIGHT = 2,
    XR_EYE_VISIBILITY_MAX_ENUM = 0x7FFFFFFF
} XrEyeVisibility;

Description

Enumerant Descriptions
  • XR_EYE_VISIBILITY_BOTH displays the layer to both eyes.

  • XR_EYE_VISIBILITY_LEFT displays the layer to the viewer’s physical left eye.

  • XR_EYE_VISIBILITY_RIGHT displays the layer to the viewer’s physical right eye.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrFormFactor(3)

Name

XrFormFactor - Supported form factors

C Specification

typedef enum XrFormFactor {
    XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY = 1,
    XR_FORM_FACTOR_HANDHELD_DISPLAY = 2,
    XR_FORM_FACTOR_MAX_ENUM = 0x7FFFFFFF
} XrFormFactor;

Description

The predefined form factors which may be supported by OpenXR runtimes are:

Enumerant Descriptions
  • XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY. The tracked display is attached to the user’s head. The user cannot touch the display itself. A VR headset would be an example of this form factor.

  • XR_FORM_FACTOR_HANDHELD_DISPLAY. The tracked display is held in the user’s hand, independent from the user’s head. The user may be able to touch the display, allowing for screen-space UI. A mobile phone running an AR experience using pass-through video would be an example of this form factor.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrObjectType(3)

Name

XrObjectType - Specify an enumeration to track object handle types

C Specification

typedef enum XrObjectType {
    XR_OBJECT_TYPE_UNKNOWN = 0,
    XR_OBJECT_TYPE_INSTANCE = 1,
    XR_OBJECT_TYPE_SESSION = 2,
    XR_OBJECT_TYPE_SWAPCHAIN = 3,
    XR_OBJECT_TYPE_SPACE = 4,
    XR_OBJECT_TYPE_ACTION_SET = 5,
    XR_OBJECT_TYPE_ACTION = 6,
    XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000019000,
    XR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFT = 1000039000,
    XR_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
} XrObjectType;

Description

The XrObjectType enumeration defines values, each of which corresponds to a specific OpenXR handle type. These values can be used to associate debug information with a particular type of object through one or more extensions.

The following table defines XrObjectType and OpenXR Handle relationships:

XrObjectType OpenXR Handle Type

XR_OBJECT_TYPE_UNKNOWN

Unknown/Undefined Handle

XR_OBJECT_TYPE_INSTANCE

XrInstance

XR_OBJECT_TYPE_SESSION

XrSession

XR_OBJECT_TYPE_SWAPCHAIN

XrSwapchain

XR_OBJECT_TYPE_SPACE

XrSpace

XR_OBJECT_TYPE_ACTION_SET

XrActionSet

XR_OBJECT_TYPE_ACTION

XrAction

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrPerfSettingsDomainEXT(3)

Name

XrPerfSettingsDomainEXT - XrPerfSettingsDomainEXT

C Specification

typedef enum XrPerfSettingsDomainEXT {
    XR_PERF_SETTINGS_DOMAIN_CPU_EXT = 1,
    XR_PERF_SETTINGS_DOMAIN_GPU_EXT = 2,
    XR_PERF_SETTINGS_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF
} XrPerfSettingsDomainEXT;

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrPerfSettingsLevelEXT(3)

Name

XrPerfSettingsLevelEXT - XrPerfSettingsLevelEXT

C Specification

typedef enum XrPerfSettingsLevelEXT {
    XR_PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT = 0,
    XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT = 25,
    XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT = 50,
    XR_PERF_SETTINGS_LEVEL_BOOST_EXT = 75,
    XR_PERF_SETTINGS_LEVEL_MAX_ENUM_EXT = 0x7FFFFFFF
} XrPerfSettingsLevelEXT;

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrPerfSettingsNotificationLevelEXT(3)

Name

XrPerfSettingsNotificationLevelEXT - XrPerfSettingsNotificationLevelEXT

C Specification

typedef enum XrPerfSettingsNotificationLevelEXT {
    XR_PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT = 0,
    XR_PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT = 25,
    XR_PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT = 75,
    XR_PERF_SETTINGS_NOTIFICATION_LEVEL_MAX_ENUM_EXT = 0x7FFFFFFF
} XrPerfSettingsNotificationLevelEXT;

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrPerfSettingsSubDomainEXT(3)

Name

XrPerfSettingsSubDomainEXT - XrPerfSettingsSubDomainEXT

C Specification

typedef enum XrPerfSettingsSubDomainEXT {
    XR_PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT = 1,
    XR_PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT = 2,
    XR_PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT = 3,
    XR_PERF_SETTINGS_SUB_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF
} XrPerfSettingsSubDomainEXT;

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrReferenceSpaceType(3)

Name

XrReferenceSpaceType - Reference space types

C Specification

An XrSpace handle for a reference space is created using xrCreateReferenceSpace, by specifying the chosen reference space type and a pose within the natural reference frame defined for that reference space type.

Runtimes implement well-known reference spaces from XrReferenceSpaceType if they support tracking of that kind:

typedef enum XrReferenceSpaceType {
    XR_REFERENCE_SPACE_TYPE_VIEW = 1,
    XR_REFERENCE_SPACE_TYPE_LOCAL = 2,
    XR_REFERENCE_SPACE_TYPE_STAGE = 3,
    XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT = 1000038000,
    XR_REFERENCE_SPACE_TYPE_MAX_ENUM = 0x7FFFFFFF
} XrReferenceSpaceType;

Description

Available reference space types are indicated by xrEnumerateReferenceSpaces. Note that other spaces can be created as well, such as pose action spaces created by xrCreateActionSpace, which are not enumerated by that API.

Enumerant Descriptions
  • XR_REFERENCE_SPACE_TYPE_VIEW. The VIEW space tracks the view origin used to generate view transforms for the primary viewer (or centroid of view origins if stereo), with +Y up, +X to the right, and -Z forward. This space points in the forward direction for the viewer without incorporating the user’s eye orientation, and is not gravity-aligned.

    VIEW space is primarily useful when projecting from the user’s perspective into another space to obtain a targeting ray, or when rendering small head-locked content such as a reticle. Content rendered in VIEW space will stay at a fixed point on head-mounted displays and may be uncomfortable to view if too large. To obtain the ideal view and projection transforms to use each frame for rendering world content, applications should call xrLocateViews instead of using this space.

    Runtimes must support this reference space.

  • XR_REFERENCE_SPACE_TYPE_LOCAL. The LOCAL reference space establishes a world-locked origin, gravity-aligned to exclude pitch and roll, with +Y up, +X to the right, and -Z forward. This space locks in both its initial position and orientation, which the runtime may define to be either the initial position at application launch or some other calibrated zero position.

    LOCAL space is useful when an application needs to render seated-scale content that is not positioned relative to the physical floor.

    When a user needs to recenter LOCAL space, a runtime may offer some system-level recentering interaction that is transparent to the application, but which causes the current leveled head space to become the new LOCAL space. When such a recentering occurs, the runtime must queue the XrEventDataReferenceSpaceChangePending event, with the recentered LOCAL space origin only taking effect for xrLocateSpace or xrLocateViews calls whose XrTime parameter is greater than or equal to the changeTime provided in that event.

    When views, controllers or other spaces experience tracking loss relative to the LOCAL space, runtimes should continue to provide inferred or last-known position and orientation values. These inferred poses can, for example, be based on neck model updates, inertial dead reckoning, or a last-known position, so long as it is still reasonable for the application to use that pose. While a runtime is providing position data, it must continue to set XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_VIEW_STATE_POSITION_VALID_BIT but it can clear XR_SPACE_LOCATION_POSITION_TRACKED_BIT and XR_VIEW_STATE_POSITION_TRACKED_BIT to indicate that the position is inferred or last-known in this way.

    When tracking is recovered, runtimes should snap the pose of other spaces back into position relative to the LOCAL space’s original origin.

    Runtimes must support this reference space.

  • XR_REFERENCE_SPACE_TYPE_STAGE. The STAGE reference space is a runtime-defined flat, rectangular space that is empty and can be walked around on. The origin is on the floor at the center of the rectangle, with +Y up, and the X and Z axes aligned with the rectangle edges. The runtime may not be able to locate spaces relative to the STAGE reference space if the user has not yet defined one within the runtime-specific UI. Applications can use xrGetReferenceSpaceBoundsRect to determine the extents of the STAGE reference space’s XZ bounds rectangle, if defined.

    STAGE space is useful when an application needs to render standing-scale content (no bounds) or room-scale content (with bounds) that is relative to the physical floor.

    When the user redefines the origin or bounds of the current STAGE space, or the runtime otherwise switches to a new STAGE definition, the runtime must queue the XrEventDataReferenceSpaceChangePending event, with the new STAGE space origin only taking effect for xrLocateSpace or xrLocateViews calls whose XrTime parameter is greater than or equal to the changeTime provided in that event.

    When views, controllers or other spaces experience tracking loss relative to the STAGE space, runtimes should continue to provide inferred or last-known position and orientation values. These inferred poses can, for example, be based on neck model updates, inertial dead reckoning, or a last-known position, so long as it is still reasonable for the application to use that pose. While a runtime is providing position data, it must continue to set XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_VIEW_STATE_POSITION_VALID_BIT but it can clear XR_SPACE_LOCATION_POSITION_TRACKED_BIT and XR_VIEW_STATE_POSITION_TRACKED_BIT to indicate that the position is inferred or last-known in this way.

    When tracking is recovered, runtimes should snap the pose of other spaces back into position relative to the STAGE space’s original origin.

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrResult(3)

Name

XrResult - Result codes

C Specification

typedef enum XrResult {
    XR_SUCCESS = 0,
    XR_TIMEOUT_EXPIRED = 1,
    XR_SESSION_LOSS_PENDING = 3,
    XR_EVENT_UNAVAILABLE = 4,
    XR_SPACE_BOUNDS_UNAVAILABLE = 7,
    XR_SESSION_NOT_FOCUSED = 8,
    XR_FRAME_DISCARDED = 9,
    XR_ERROR_VALIDATION_FAILURE = -1,
    XR_ERROR_RUNTIME_FAILURE = -2,
    XR_ERROR_OUT_OF_MEMORY = -3,
    XR_ERROR_API_VERSION_UNSUPPORTED = -4,
    XR_ERROR_INITIALIZATION_FAILED = -6,
    XR_ERROR_FUNCTION_UNSUPPORTED = -7,
    XR_ERROR_FEATURE_UNSUPPORTED = -8,
    XR_ERROR_EXTENSION_NOT_PRESENT = -9,
    XR_ERROR_LIMIT_REACHED = -10,
    XR_ERROR_SIZE_INSUFFICIENT = -11,
    XR_ERROR_HANDLE_INVALID = -12,
    XR_ERROR_INSTANCE_LOST = -13,
    XR_ERROR_SESSION_RUNNING = -14,
    XR_ERROR_SESSION_NOT_RUNNING = -16,
    XR_ERROR_SESSION_LOST = -17,
    XR_ERROR_SYSTEM_INVALID = -18,
    XR_ERROR_PATH_INVALID = -19,
    XR_ERROR_PATH_COUNT_EXCEEDED = -20,
    XR_ERROR_PATH_FORMAT_INVALID = -21,
    XR_ERROR_PATH_UNSUPPORTED = -22,
    XR_ERROR_LAYER_INVALID = -23,
    XR_ERROR_LAYER_LIMIT_EXCEEDED = -24,
    XR_ERROR_SWAPCHAIN_RECT_INVALID = -25,
    XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -26,
    XR_ERROR_ACTION_TYPE_MISMATCH = -27,
    XR_ERROR_SESSION_NOT_READY = -28,
    XR_ERROR_SESSION_NOT_STOPPING = -29,
    XR_ERROR_TIME_INVALID = -30,
    XR_ERROR_REFERENCE_SPACE_UNSUPPORTED = -31,
    XR_ERROR_FILE_ACCESS_ERROR = -32,
    XR_ERROR_FILE_CONTENTS_INVALID = -33,
    XR_ERROR_FORM_FACTOR_UNSUPPORTED = -34,
    XR_ERROR_FORM_FACTOR_UNAVAILABLE = -35,
    XR_ERROR_API_LAYER_NOT_PRESENT = -36,
    XR_ERROR_CALL_ORDER_INVALID = -37,
    XR_ERROR_GRAPHICS_DEVICE_INVALID = -38,
    XR_ERROR_POSE_INVALID = -39,
    XR_ERROR_INDEX_OUT_OF_RANGE = -40,
    XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED = -41,
    XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED = -42,
    XR_ERROR_NAME_DUPLICATED = -44,
    XR_ERROR_NAME_INVALID = -45,
    XR_ERROR_ACTIONSET_NOT_ATTACHED = -46,
    XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47,
    XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48,
    XR_ERROR_LOCALIZED_NAME_INVALID = -49,
    XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR = -1000003000,
    XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR = -1000003001,
    XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT = -1000039001,
    XR_RESULT_MAX_ENUM = 0x7FFFFFFF
} XrResult;

Description

All return codes in the API are reported via XrResult return values.

Some common suffixes shared across many of the return codes are defined below:

  • _INVALID: The specified handle, atom or value is formatted incorrectly, or the specified handle was never created or has been destroyed.

  • _UNSUPPORTED: The specified handle, atom, enumerant or value is formatted correctly but cannot be used for the lifetime of this function’s parent handle.

  • _UNAVAILABLE: The specified handle, atom, enumerant or value is supported by this function’s parent handle but not at this moment.

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

XrSessionState(3)

Name

XrSessionState - Session lifecycle state

C Specification

The XrSessionState enumerates the possible session lifecycle states:

typedef enum XrSessionState {
    XR_SESSION_STATE_UNKNOWN = 0,
    XR_SESSION_STATE_IDLE = 1,
    XR_SESSION_STATE_READY = 2,
    XR_SESSION_STATE_SYNCHRONIZED = 3,
    XR_SESSION_STATE_VISIBLE = 4,
    XR_SESSION_STATE_FOCUSED = 5,
    XR_SESSION_STATE_STOPPING = 6,
    XR_SESSION_STATE_LOSS_PENDING = 7,
    XR_SESSION_STATE_EXITING = 8,
    XR_SESSION_STATE_MAX_ENUM = 0x7FFFFFFF
} XrSessionState;

Description

Enumerant Descriptions
  • XR_SESSION_STATE_UNKNOWN. An unknown state. The runtime must not return this value in an XrEventDataSessionStateChanged event.

  • XR_SESSION_STATE_IDLE. The initial state after calling xrCreateSession or returned to after calling xrEndSession.

  • XR_SESSION_STATE_READY. The application is ready to call xrBeginSession and sync its frame loop with the runtime.

  • XR_SESSION_STATE_SYNCHRONIZED. The application has synced its frame loop with the runtime but is not visible to the user.

  • XR_SESSION_STATE_VISIBLE. The application has synced its frame loop with the runtime and is visible to the user but cannot receive XR input.

  • XR_SESSION_STATE_FOCUSED. The application has synced its frame loop with the runtime, is visible to the user and can receive XR input.

  • XR_SESSION_STATE_STOPPING. The application should exit its frame loop and call xrEndSession.

  • XR_SESSION_STATE_LOSS_PENDING. The session is in the process of being lost. The application should destroy the current session and can optionally recreate it.

  • XR_SESSION_STATE_EXITING. The application should end its XR experience and not automatically restart it.

The XR_SESSION_STATE_UNKNOWN state must not be returned by the runtime, and is only defined to avoid 0 being a valid state.

Receiving the XR_SESSION_STATE_IDLE state indicates that the runtime considers the session is idle. Applications in this state should minimize resource consumption but continue to call xrPollEvent at some reasonable cadence.

Receiving the XR_SESSION_STATE_READY state indicates that the runtime desires the application to prepare rendering resources, begin its session and synchronize its frame loop with the runtime. The application does this by successfully calling xrBeginSession and then running its frame loop by calling xrWaitFrame, xrBeginFrame and xrEndFrame in a loop. If the runtime wishes to return the session to the XR_SESSION_STATE_IDLE state, it must wait until the application calls xrBeginSession. After returning from the xrBeginSession call, the runtime may then immediately transition forward through the XR_SESSION_STATE_SYNCHRONIZED state to the XR_SESSION_STATE_STOPPING state, to request that the application end this session. If the system supports a user engagement sensor and runtime is in XR_SESSION_STATE_IDLE state, the runtime should not transition to the XR_SESSION_STATE_READY state until the user starts engaging with the device.

Receiving the XR_SESSION_STATE_SYNCHRONIZED state indicates that the application has synchronized its frame loop with the runtime, but its frames are not visible to the user. The application should continue running its frame loop by calling xrWaitFrame, xrBeginFrame and xrEndFrame, although it should avoid heavy GPU work so that other visible applications can take CPU and GPU precedence. The application can save resources here by skipping rendering and not submitting any composition layers until xrWaitFrame returns an XrFrameState with shouldRender