C Specification

The xrBeginSession function is defined as:

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

Parameters

Parameter Descriptions

Description

When an app begins a session, it is requesting that the runtime show its rendered output to the user.

Note that a runtime may decide not to show a given session’s output to the user at any time, for example if the user has switched to a different app’s running session. If the session is running but the runtime does not make the session visible, XR_SESSION_VISIBILITY_UNAVAILABLE must be returned. The app should use the XrEventDataSessionStateChanged event to determine when this session is visible to the user and is focused to receive input. If primaryViewConfigurationType in beginInfo is not supported by the XrInstance that created session the runtime must return XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED. If a session was already begun for session, then the runtime must return XR_ERROR_SESSION_RUNNING.

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

  • XR_SESSION_VISIBILITY_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_SESSION_RUNNING

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