From 377979e38019d20a40d55ac7461a1ff14256c8a2 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 25 Jun 2015 15:41:10 -0700 Subject: [PATCH] Make field of view preference change be applied immediately --- interface/src/Application.cpp | 5 +++-- interface/src/Application.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f828f05258..8c8e624dcb 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1029,7 +1029,7 @@ void Application::showEditEntitiesHelp() { InfoView::show(INFO_EDIT_ENTITIES_PATH); } -void Application::resetCamerasOnResizeGL(Camera& camera, const glm::uvec2& size) { +void Application::resetCameras(Camera& camera, const glm::uvec2& size) { if (OculusManager::isConnected()) { OculusManager::configureCamera(camera); } else if (TV3DManager::isConnected()) { @@ -1052,7 +1052,6 @@ void Application::resizeGL() { if (_renderResolution != toGlm(renderSize)) { _renderResolution = toGlm(renderSize); DependencyManager::get()->setFrameBufferSize(renderSize); - resetCamerasOnResizeGL(_myCamera, _renderResolution); glViewport(0, 0, _renderResolution.x, _renderResolution.y); // shouldn't this account for the menu??? @@ -1060,6 +1059,8 @@ void Application::resizeGL() { glLoadIdentity(); } + resetCameras(_myCamera, _renderResolution); + auto offscreenUi = DependencyManager::get(); auto canvasSize = _glWidget->size(); diff --git a/interface/src/Application.h b/interface/src/Application.h index b126757621..61c029e8cf 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -479,7 +479,7 @@ private slots: void setCursorVisible(bool visible); private: - void resetCamerasOnResizeGL(Camera& camera, const glm::uvec2& size); + void resetCameras(Camera& camera, const glm::uvec2& size); void updateProjectionMatrix(); void updateProjectionMatrix(Camera& camera, bool updateViewFrustum = true);