Forum Discussion
ctrlaltdavid
11 years agoHonored Guest
How to exit direct mode?
I've managed to get direct mode working with OpenGL on Windows using the SDK / C++. But how can you exit direct mode back to normal mono display in the application?
The application I'm working on starts up in mono display and the user can toggle in and out of VR display mode at will. This works well with the Rift configured to use extended mode, but with direct mode there seems to be no way to do the opposite of ovr_attachToWindow(). For example, doing ovrHmd_Destroy() and ovr_Shutdown() just leaves the application window a solid black.
The application I'm working on starts up in mono display and the user can toggle in and out of VR display mode at will. This works well with the Rift configured to use extended mode, but with direct mode there seems to be no way to do the opposite of ovr_attachToWindow(). For example, doing ovrHmd_Destroy() and ovr_Shutdown() just leaves the application window a solid black.
6 Replies
- RajveerExplorerMy engine allows toggling HMD on/off and I would also like for there to be a detatch window method when run in direct mode.
- owenwpExpert ProtegeWhy are you trying to do this? Does it matter if the Oculus SDK is still active? If it is just a matter of showing an image on the Rift, there is a device caps bit flag for disabling the Rift's screen while in direct mode.
Otherwise you will need to shutdown and re-initialize the graphics API. - RajveerExplorerNobody said that deactivating the Oculus SDK was the goal - the goal is to detatch the window from the HMD and have it back to as it was before attaching it. OP was trying to deactivate the SDK as a means to detatch the window, but it didn't work. If you can attach a window, you should be able to detatch it also.
- owenwpExpert ProtegeBut again, for what purpose? It should never be necessary. If you want to stop rendering in stereo, stop rendering in stereo. If you want to go fullscreen, go fullscreen. There should not be anything stopping you.
- ConstellationAdventurer
"ctrlaltdavid" wrote:
I've managed to get direct mode working with OpenGL on Windows using the SDK / C++.
I've been struggling with this for quite some time; what was it you did to get it to work? - jhericoAdventurer
"JeffBail" wrote:
"ctrlaltdavid" wrote:
I've managed to get direct mode working with OpenGL on Windows using the SDK / C++.
I've been struggling with this for quite some time; what was it you did to get it to work?
I've found a lot of problems stem from the fact that Direct Mode won't engage unless you're calling the ovrHmd_GetEyePoses() method on each frame. Clearly, it shouldn't be a requirement, and you don't have to actually use the values you get back during rendering, but if I'm not calling that in your rendering loop, Direct Mode never activates.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 2 years ago
- 8 months ago
- 11 months ago