mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
disable threaded reprojection when running oculus in OpenVR
This commit is contained in:
parent
786d09795b
commit
3a68f48cd7
3 changed files with 12 additions and 1 deletions
|
@ -401,9 +401,13 @@ bool OpenVrDisplayPlugin::internalActivate() {
|
|||
memset(&timing, 0, sizeof(timing));
|
||||
timing.m_nSize = sizeof(vr::Compositor_FrameTiming);
|
||||
vr::VRCompositor()->GetFrameTiming(&timing);
|
||||
_asyncReprojectionActive = timing.m_nReprojectionFlags & VRCompositor_ReprojectionAsync;
|
||||
auto usingOpenVRForOculus = oculusViaOpenVR();
|
||||
_asyncReprojectionActive = (timing.m_nReprojectionFlags & VRCompositor_ReprojectionAsync) || usingOpenVRForOculus;
|
||||
|
||||
_threadedSubmit = !_asyncReprojectionActive;
|
||||
if (usingOpenVRForOculus) {
|
||||
qDebug() << "Oculus active via OpenVR: " << usingOpenVRForOculus;
|
||||
}
|
||||
qDebug() << "OpenVR Async Reprojection active: " << _asyncReprojectionActive;
|
||||
qDebug() << "OpenVR Threaded submit enabled: " << _threadedSubmit;
|
||||
|
||||
|
|
|
@ -60,6 +60,12 @@ bool isOculusPresent() {
|
|||
return result;
|
||||
}
|
||||
|
||||
bool oculusViaOpenVR() {
|
||||
static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR");
|
||||
static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||
return enableDebugOpenVR && isOculusPresent() && vr::VR_IsHmdPresent();
|
||||
}
|
||||
|
||||
bool openVrSupported() {
|
||||
static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR");
|
||||
static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <controllers/Forward.h>
|
||||
#include <plugins/Forward.h>
|
||||
|
||||
bool oculusViaOpenVR(); // is the user using Oculus via OpenVR
|
||||
bool openVrSupported();
|
||||
|
||||
vr::IVRSystem* acquireOpenVrSystem();
|
||||
|
|
Loading…
Reference in a new issue