mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:36:57 +02:00
Code review
This commit is contained in:
parent
5e624246a8
commit
a3e677e64f
6 changed files with 10 additions and 10 deletions
|
@ -2719,7 +2719,7 @@ void Application::initializeDisplayPlugins() {
|
||||||
[this](const QSize& size) { resizeGL(); });
|
[this](const QSize& size) { resizeGL(); });
|
||||||
QObject::connect(displayPlugin.get(), &DisplayPlugin::resetSensorsRequested, this, &Application::requestReset);
|
QObject::connect(displayPlugin.get(), &DisplayPlugin::resetSensorsRequested, this, &Application::requestReset);
|
||||||
if (displayPlugin->isHmd()) {
|
if (displayPlugin->isHmd()) {
|
||||||
QObject::connect(dynamic_cast<HmdDisplayPlugin*>(displayPlugin.get()), &HmdDisplayPlugin::isHmdMountedChanged,
|
QObject::connect(dynamic_cast<HmdDisplayPlugin*>(displayPlugin.get()), &HmdDisplayPlugin::hmdMountedChanged,
|
||||||
DependencyManager::get<HMDScriptingInterface>().data(), &HMDScriptingInterface::mountedChanged);
|
DependencyManager::get<HMDScriptingInterface>().data(), &HMDScriptingInterface::mountedChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
virtual bool onDisplayTextureReset() override { _clearPreviewFlag = true; return true; };
|
virtual bool onDisplayTextureReset() override { _clearPreviewFlag = true; return true; };
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void isHmdMountedChanged();
|
void hmdMountedChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void hmdPresent() = 0;
|
virtual void hmdPresent() = 0;
|
||||||
|
|
|
@ -36,9 +36,9 @@ bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) {
|
||||||
if (ovr::reorientRequested(status)) {
|
if (ovr::reorientRequested(status)) {
|
||||||
emit resetSensorsRequested();
|
emit resetSensorsRequested();
|
||||||
}
|
}
|
||||||
if (ovr::hmdMounted(status) != _isHmdMounted) {
|
if (ovr::hmdMounted(status) != _hmdMounted) {
|
||||||
_isHmdMounted = !_isHmdMounted;
|
_hmdMounted = !_hmdMounted;
|
||||||
emit isHmdMountedChanged();
|
emit hmdMountedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentRenderFrameInfo = FrameInfo();
|
_currentRenderFrameInfo = FrameInfo();
|
||||||
|
|
|
@ -44,5 +44,5 @@ protected:
|
||||||
ovrLayerEyeFov _sceneLayer;
|
ovrLayerEyeFov _sceneLayer;
|
||||||
ovrViewScaleDesc _viewScaleDesc;
|
ovrViewScaleDesc _viewScaleDesc;
|
||||||
// ovrLayerEyeFovDepth _depthLayer;
|
// ovrLayerEyeFovDepth _depthLayer;
|
||||||
bool _isHmdMounted { false };
|
bool _hmdMounted { false };
|
||||||
};
|
};
|
||||||
|
|
|
@ -701,9 +701,9 @@ void OpenVrDisplayPlugin::postPreview() {
|
||||||
_nextRenderPoseData = nextRender;
|
_nextRenderPoseData = nextRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHmdMounted() != _isHmdMounted) {
|
if (isHmdMounted() != _hmdMounted) {
|
||||||
_isHmdMounted = !_isHmdMounted;
|
_hmdMounted = !_hmdMounted;
|
||||||
emit isHmdMountedChanged();
|
emit hmdMountedChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,5 +91,5 @@ private:
|
||||||
|
|
||||||
bool _asyncReprojectionActive { false };
|
bool _asyncReprojectionActive { false };
|
||||||
|
|
||||||
bool _isHmdMounted { false };
|
bool _hmdMounted { false };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue