How do you switch stereo rendering devices at run time?
Engine version 4.4.3
I'm looking to switch stereo rendering between stereo and OVR devices at run time. Currently I am using the FFakeStereoRenderingDevice for use with 3DTV and the OculusHMD plugin for VR. My current implementation allows me to switch from 3DTV to OVR at run time with no problems, but when I switch back, the window appears to be stuck on the last frame rendered for the oculus renderer. I can hear audio and the game continues to run.
My current implementation creates both renderers when UEngine::InitializeHMDDevice() and stores shared pointers to each as members of the engine. then, in my player controller just swap which pointer is currently assigned to UEngine::StereoRenderingDevice
As mentioned, when I switch from stereo to OVR HMD the switch occurs normally. However, switching from OVR to stereo doesn't seem to utilize the other device.
Is there a legitimate method for notifying the engine of a request to change rendering devices?
The solution was to add a second shared pointer to hold the reference to the hmd device when it wasn't in use. Then call
to ensure that the engine does not think that HMDDevice is valid.
I would still be interested to hear if there is a more natural way to accomplish this behavior without altering the engine header and implementation.
answered Aug 31 '15 at 02:29 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here