From c20c6e4b90081b4b36310e830fcb3789678ce2af Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 17 Jul 2015 16:01:32 -0700 Subject: [PATCH] fix retina in an Austin approved manner --- interface/src/Application.cpp | 5 +---- interface/src/ui/overlays/Overlays.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b3270332f4..002ba68a86 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -896,10 +896,7 @@ void Application::paintGL() { { PerformanceTimer perfTimer("renderOverlay"); - // NOTE: the ApplicationOverlay class assumes it's viewport is setup to be the device size - // There is no batch associated with this renderArgs - glm::vec2 size = getCanvasSize(); - renderArgs._viewport = glm::ivec4(0, 0, size.x, size.y); + // NOTE: There is no batch associated with this renderArgs _applicationOverlay.renderOverlay(&renderArgs); } diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index 343e571bfe..0d40c60ca4 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -102,8 +102,10 @@ void Overlays::renderHUD(RenderArgs* renderArgs) { auto geometryCache = DependencyManager::get(); auto textureCache = DependencyManager::get(); - int width = renderArgs->_viewport.z; - int height = renderArgs->_viewport.w; + + auto size = qApp->getCanvasSize(); + int width = size.x; + int height = size.y; mat4 legacyProjection = glm::ortho(0, width, height, 0, -1000, 1000);