C Specification
The xrEndSession function is defined as:
// Provided by XR_VERSION_1_0
XrResult xrEndSession(
XrSession session);
Parameters
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 allowing the runtime to safely transition the session to
XR_SESSION_STATE_IDLE
.
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 running session, the application can
call xrRequestExitSession so that the session transitions from
XR_SESSION_STATE_IDLE
to XR_SESSION_STATE_EXITING
.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2024, The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.