From 9311eeb8f5913619b830bde3158ce4e1b313c4dc Mon Sep 17 00:00:00 2001 From: barnold1953 Date: Wed, 28 May 2014 14:41:30 -0700 Subject: [PATCH 1/3] Fixed compiler warning --- interface/src/Application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fac0ef154f..570bdb8167 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -162,10 +162,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : _bytesPerSecond(0), _nodeBoundsDisplay(this), _previousScriptLocation(), + _applicationOverlay(), _runningScriptsWidget(new RunningScriptsWidget(_window)), _runningScriptsWidgetWasVisible(false), - _trayIcon(new QSystemTrayIcon(_window)), - _applicationOverlay() + _trayIcon(new QSystemTrayIcon(_window)) { // read the ApplicationInfo.ini file for Name/Version/Domain information QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat); From e6d12bf239f3abec108abbab45aafc3f073abd7a Mon Sep 17 00:00:00 2001 From: barnold1953 Date: Wed, 28 May 2014 15:56:14 -0700 Subject: [PATCH 2/3] Disabled overlay for oculus. We still have to call applicationOverlay.renderOverlay(true) or prioVR cant calibrate. --- interface/src/devices/OculusManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/interface/src/devices/OculusManager.cpp b/interface/src/devices/OculusManager.cpp index 8f71d38bdb..af18db4006 100644 --- a/interface/src/devices/OculusManager.cpp +++ b/interface/src/devices/OculusManager.cpp @@ -83,7 +83,9 @@ void OculusManager::display(Camera& whichCamera) { #ifdef HAVE_LIBOVR ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay(); // We only need to render the overlays to a texture once, then we just render the texture as a quad + // PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay() applicationOverlay.renderOverlay(true); + const bool displayOverlays = false; Application::getInstance()->getGlowEffect()->prepare(); @@ -104,7 +106,9 @@ void OculusManager::display(Camera& whichCamera) { Application::getInstance()->displaySide(whichCamera); - applicationOverlay.displayOverlayTextureOculus(whichCamera); + if (displayOverlays) { + applicationOverlay.displayOverlayTextureOculus(whichCamera); + } // and the right eye to the right side const StereoEyeParams& rightEyeParams = _stereoConfig.GetEyeRenderParams(StereoEye_Right); @@ -121,7 +125,9 @@ void OculusManager::display(Camera& whichCamera) { Application::getInstance()->displaySide(whichCamera); - applicationOverlay.displayOverlayTextureOculus(whichCamera); + if (displayOverlays) { + applicationOverlay.displayOverlayTextureOculus(whichCamera); + } glPopMatrix(); From 81ed0d99f77e0377a596e8e779569ce8d83e3f80 Mon Sep 17 00:00:00 2001 From: barnold1953 Date: Wed, 28 May 2014 17:13:59 -0700 Subject: [PATCH 3/3] Added prediction for Oculus rift to reduce apparent latency. --- interface/src/devices/OculusManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/devices/OculusManager.cpp b/interface/src/devices/OculusManager.cpp index af18db4006..c8b2d0dcbc 100644 --- a/interface/src/devices/OculusManager.cpp +++ b/interface/src/devices/OculusManager.cpp @@ -50,7 +50,8 @@ void OculusManager::connect() { _sensorDevice = *_hmdDevice->GetSensor(); _sensorFusion = new SensorFusion; _sensorFusion->AttachToSensor(_sensorDevice); - + _sensorFusion->SetPredictionEnabled(true); + HMDInfo info; _hmdDevice->GetDeviceInfo(&info); _stereoConfig.SetHMDInfo(info); @@ -201,7 +202,7 @@ void OculusManager::reset() { void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) { #ifdef HAVE_LIBOVR - _sensorFusion->GetOrientation().GetEulerAngles(&yaw, &pitch, &roll); + _sensorFusion->GetPredictedOrientation().GetEulerAngles(&yaw, &pitch, &roll); #endif }