C Specification

The xrSyncActionData function is defined as:

XrResult xrSyncActionData(
    XrSession                                   session,
    uint32_t                                    countActionSets,
    const XrActiveActionSet*                    actionSets);

Parameters

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

  • 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 XrActiveActionSet structures, all from session, that should be synchronized.

Description

xrSyncActionData updates the current state of input actions. Repeated input action state queries between subsequent synchronization calls must return the same values. This call must be called with an array containing the XrActiveActionSet structures, that reference action sets which belong to a single, running session, that should be updated during this synchronization. Any XrActionSet that has been created in this session but was not passed to xrSyncActionData will not be updated and all action state queries will return that the action is inactive.

If session is not running, the runtime must return XR_ERROR_SESSION_NOT_RUNNING. If session is not focused, the runtime must return XR_SESSION_NOT_FOCUSED, and all actions in the session will be inactive.

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

  • 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 XrActiveActionSet structures, all from session, that should be synchronized.

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

  • countActionSets must be a valid uint32_t value

  • actionSets must be a pointer to an array of countActionSets valid XrActiveActionSet structures

  • countActionSets must be greater than 0

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_VALIDATION_FAILURE

  • XR_ERROR_SESSION_NOT_RUNNING

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.