From 56ff74dd56334b9300fba948c239843a6098b263 Mon Sep 17 00:00:00 2001 From: barnold1953 Date: Wed, 9 Jul 2014 16:39:05 -0700 Subject: [PATCH] Removed ApplicationOverlay::resize() --- interface/src/Application.cpp | 1 - interface/src/ui/ApplicationOverlay.cpp | 14 +++----------- interface/src/ui/ApplicationOverlay.h | 5 +---- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 42184bbdda..06ba3e442e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -723,7 +723,6 @@ void Application::resizeGL(int width, int height) { resetCamerasOnResizeGL(_myCamera, width, height); glViewport(0, 0, width, height); // shouldn't this account for the menu??? - _applicationOverlay.resize(); updateProjectionMatrix(); glLoadIdentity(); diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index caf103c00c..9ec87483dc 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -1189,20 +1189,12 @@ void ApplicationOverlay::renderTexturedHemisphere() { } -void ApplicationOverlay::resize() { - if (_framebufferObject != NULL) { - delete _framebufferObject; - _framebufferObject = NULL; - } - // _framebufferObject is recreated at the correct size the next time it is accessed via getFramebufferObject(). -} - QOpenGLFramebufferObject* ApplicationOverlay::getFramebufferObject() { QSize size = Application::getInstance()->getGLWidget()->size(); if (!_framebufferObject || _framebufferObject->size() != size) { - if (_framebufferObject){ - delete _framebufferObject; - } + + delete _framebufferObject; + _framebufferObject = new QOpenGLFramebufferObject(size); glBindTexture(GL_TEXTURE_2D, _framebufferObject->texture()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); diff --git a/interface/src/ui/ApplicationOverlay.h b/interface/src/ui/ApplicationOverlay.h index a956858051..a64e26ed67 100644 --- a/interface/src/ui/ApplicationOverlay.h +++ b/interface/src/ui/ApplicationOverlay.h @@ -32,11 +32,8 @@ public: void displayOverlayTexture3DTV(Camera& whichCamera, float aspectRatio, float fov); void computeOculusPickRay(float x, float y, glm::vec3& direction) const; void getClickLocation(int &x, int &y) const; -<<<<<<< HEAD QPoint getOculusPalmClickLocation(const PalmData *palm) const; -======= - void resize(); ->>>>>>> af6704a83cec1d69b3dc3e1145238919fcb82933 + // Getters QOpenGLFramebufferObject* getFramebufferObject();