Merge branch 'master' of https://github.com/highfidelity/hifi into sandbox-entity-includes

This commit is contained in:
howard-stearns 2016-04-05 14:58:27 -07:00
commit 1de3aaffc7
2 changed files with 14 additions and 0 deletions

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

View file

@ -90,12 +90,16 @@ ovrSession acquireOculusSession() {
void releaseOculusSession() {
Q_ASSERT(refCount > 0 && session);
// HACK the Oculus runtime doesn't seem to play well with repeated shutdown / restart.
// So for now we'll just hold on to the session
#if 0
if (!--refCount) {
qCDebug(oculus) << "oculus: zero refcount, shutdown SDK and session";
ovr_Destroy(session);
ovr_Shutdown();
session = nullptr;
}
#endif
}