I am writing an application using OpenXR
on Windows using the Windows Mixed Reality OpenXR
addon/plugin. When my application runs and the VR device goes to sleep, I get a state change to exit the OpenXR application. According to the OpenXR lifecycle there's no way back (and I properly exit my application). I can wake up the glasses in the Mixed Reality Portal. Even if I ignore the exit state change in my application and keep it running, after waking up the glasses I don't get any state-changing events in my OpenXR application.
Is this the correct behaviour? I assumed I need to properly handle going to sleep in my application (pause the application for example and continue on waking up the device). Is there something else I am missing?
Here are the state changes I recorded (just starting the application and waiting for the VR device to go sleep):
- XR_SESSION_STATE_IDLE
- XR_SESSION_STATE_READY
- XR_SESSION_STATE_SYNCHRONIZED
- XR_SESSION_STATE_VISIBLE
- XR_SESSION_STATE_SYNCHRONIZED
- XR_SESSION_STATE_STOPPING
- XR_SESSION_STATE_IDLE
- XR_SESSION_STATE_EXITING
so the actual question is: How do I properly handle VR devices going to sleep when using OpenXR
with Windows Mixed Reality
?
Thanks for any hints :)