mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:21:16 +02:00
Merge pull request #2944 from Barnold1953/master
Disable oculus overlay until it is curved.
This commit is contained in:
commit
31237003db
2 changed files with 13 additions and 6 deletions
|
@ -162,10 +162,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_bytesPerSecond(0),
|
_bytesPerSecond(0),
|
||||||
_nodeBoundsDisplay(this),
|
_nodeBoundsDisplay(this),
|
||||||
_previousScriptLocation(),
|
_previousScriptLocation(),
|
||||||
|
_applicationOverlay(),
|
||||||
_runningScriptsWidget(new RunningScriptsWidget(_window)),
|
_runningScriptsWidget(new RunningScriptsWidget(_window)),
|
||||||
_runningScriptsWidgetWasVisible(false),
|
_runningScriptsWidgetWasVisible(false),
|
||||||
_trayIcon(new QSystemTrayIcon(_window)),
|
_trayIcon(new QSystemTrayIcon(_window))
|
||||||
_applicationOverlay()
|
|
||||||
{
|
{
|
||||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||||
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||||
|
|
|
@ -50,7 +50,8 @@ void OculusManager::connect() {
|
||||||
_sensorDevice = *_hmdDevice->GetSensor();
|
_sensorDevice = *_hmdDevice->GetSensor();
|
||||||
_sensorFusion = new SensorFusion;
|
_sensorFusion = new SensorFusion;
|
||||||
_sensorFusion->AttachToSensor(_sensorDevice);
|
_sensorFusion->AttachToSensor(_sensorDevice);
|
||||||
|
_sensorFusion->SetPredictionEnabled(true);
|
||||||
|
|
||||||
HMDInfo info;
|
HMDInfo info;
|
||||||
_hmdDevice->GetDeviceInfo(&info);
|
_hmdDevice->GetDeviceInfo(&info);
|
||||||
_stereoConfig.SetHMDInfo(info);
|
_stereoConfig.SetHMDInfo(info);
|
||||||
|
@ -83,7 +84,9 @@ void OculusManager::display(Camera& whichCamera) {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
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
|
// 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);
|
applicationOverlay.renderOverlay(true);
|
||||||
|
const bool displayOverlays = false;
|
||||||
|
|
||||||
Application::getInstance()->getGlowEffect()->prepare();
|
Application::getInstance()->getGlowEffect()->prepare();
|
||||||
|
|
||||||
|
@ -104,7 +107,9 @@ void OculusManager::display(Camera& whichCamera) {
|
||||||
|
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
if (displayOverlays) {
|
||||||
|
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
||||||
|
}
|
||||||
|
|
||||||
// and the right eye to the right side
|
// and the right eye to the right side
|
||||||
const StereoEyeParams& rightEyeParams = _stereoConfig.GetEyeRenderParams(StereoEye_Right);
|
const StereoEyeParams& rightEyeParams = _stereoConfig.GetEyeRenderParams(StereoEye_Right);
|
||||||
|
@ -121,7 +126,9 @@ void OculusManager::display(Camera& whichCamera) {
|
||||||
|
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
if (displayOverlays) {
|
||||||
|
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
||||||
|
}
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
@ -195,7 +202,7 @@ void OculusManager::reset() {
|
||||||
|
|
||||||
void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
|
void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
_sensorFusion->GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CCW, Handed_R>(&yaw, &pitch, &roll);
|
_sensorFusion->GetPredictedOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CCW, Handed_R>(&yaw, &pitch, &roll);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue