mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:13:09 +02:00
Merging with upstream
This commit is contained in:
commit
80240123b9
4 changed files with 13 additions and 1 deletions
|
@ -51,6 +51,7 @@ QJsonObject OpenGLVersionChecker::checkVersion(bool& valid, bool& override) {
|
||||||
override = false;
|
override = false;
|
||||||
|
|
||||||
QGLWidget* glWidget = new QGLWidget(getDefaultGLFormat());
|
QGLWidget* glWidget = new QGLWidget(getDefaultGLFormat());
|
||||||
|
|
||||||
valid = glWidget->isValid();
|
valid = glWidget->isValid();
|
||||||
// Inform user if no OpenGL support
|
// Inform user if no OpenGL support
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
|
|
@ -401,9 +401,13 @@ bool OpenVrDisplayPlugin::internalActivate() {
|
||||||
memset(&timing, 0, sizeof(timing));
|
memset(&timing, 0, sizeof(timing));
|
||||||
timing.m_nSize = sizeof(vr::Compositor_FrameTiming);
|
timing.m_nSize = sizeof(vr::Compositor_FrameTiming);
|
||||||
vr::VRCompositor()->GetFrameTiming(&timing);
|
vr::VRCompositor()->GetFrameTiming(&timing);
|
||||||
_asyncReprojectionActive = timing.m_nReprojectionFlags & VRCompositor_ReprojectionAsync;
|
auto usingOpenVRForOculus = oculusViaOpenVR();
|
||||||
|
_asyncReprojectionActive = (timing.m_nReprojectionFlags & VRCompositor_ReprojectionAsync) || usingOpenVRForOculus;
|
||||||
|
|
||||||
_threadedSubmit = !_asyncReprojectionActive;
|
_threadedSubmit = !_asyncReprojectionActive;
|
||||||
|
if (usingOpenVRForOculus) {
|
||||||
|
qDebug() << "Oculus active via OpenVR: " << usingOpenVRForOculus;
|
||||||
|
}
|
||||||
qDebug() << "OpenVR Async Reprojection active: " << _asyncReprojectionActive;
|
qDebug() << "OpenVR Async Reprojection active: " << _asyncReprojectionActive;
|
||||||
qDebug() << "OpenVR Threaded submit enabled: " << _threadedSubmit;
|
qDebug() << "OpenVR Threaded submit enabled: " << _threadedSubmit;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,12 @@ bool isOculusPresent() {
|
||||||
return result;
|
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() {
|
bool openVrSupported() {
|
||||||
static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR");
|
static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR");
|
||||||
static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <controllers/Forward.h>
|
#include <controllers/Forward.h>
|
||||||
#include <plugins/Forward.h>
|
#include <plugins/Forward.h>
|
||||||
|
|
||||||
|
bool oculusViaOpenVR(); // is the user using Oculus via OpenVR
|
||||||
bool openVrSupported();
|
bool openVrSupported();
|
||||||
|
|
||||||
vr::IVRSystem* acquireOpenVrSystem();
|
vr::IVRSystem* acquireOpenVrSystem();
|
||||||
|
|
Loading…
Reference in a new issue