Display a blank frame before switching away from oculus

This commit is contained in:
Brad Davis 2016-04-05 13:03:14 -07:00
parent ffc2c75534
commit 71e6f9bdd6

View file

@ -52,6 +52,16 @@ void OculusDisplayPlugin::customizeContext() {
}
void OculusDisplayPlugin::uncustomizeContext() {
using namespace oglplus;
// Present a final black frame to the HMD
_compositeFramebuffer->Bound(FramebufferTarget::Draw, [] {
Context::ClearColor(0, 0, 0, 1);
Context::Clear().ColorBuffer();
});
hmdPresent();
#if (OVR_MAJOR_VERSION >= 6)
_sceneFbo.reset();
#endif