Showing the changes to interface/src/ui/ApplicationOverlay.cpp (1 of 1 file). Show all
Unified · Split
| @@ -166,13 +166,11 @@ void ApplicationOverlay::renderRearView(RenderArgs* renderArgs) { · 165 unmodified lines | |||
| 166 | batch.setViewTransform(Transform()); | 166 | batch.setViewTransform(Transform()); |
| 167 | 167 | ||
| 168 | float screenRatio = ((float)qApp->getDevicePixelRatio()); | 168 | float screenRatio = ((float)qApp->getDevicePixelRatio()); |
| 169 | float renderRatio = ((float)screenRatio * qApp->getRenderResolutionScale()); | 169 | float renderRatio = ((float)qApp->getRenderResolutionScale()); |
| 170 | 170 | ||
| 171 | auto viewport = qApp->getMirrorViewRect(); | 171 | auto viewport = qApp->getMirrorViewRect(); |
| 172 | glm::vec2 bottomLeft(viewport.left(), viewport.top() + viewport.height()); | 172 | glm::vec2 bottomLeft(viewport.left(), viewport.top() + screenRatio * viewport.height()); |
| 173 | glm::vec2 topRight(viewport.left() + viewport.width(), viewport.top()); | 173 | glm::vec2 topRight(viewport.left() + screenRatio * viewport.width(), viewport.top()); |
| 174 | bottomLeft *= screenRatio; | ||
| 175 | topRight *= screenRatio; | ||
| 176 | glm::vec2 texCoordMinCorner(0.0f, 0.0f); | 174 | glm::vec2 texCoordMinCorner(0.0f, 0.0f); |
| 177 | glm::vec2 texCoordMaxCorner(viewport.width() * renderRatio / float(selfieTexture->getWidth()), viewport.height() * renderRatio / float(selfieTexture->getHeight())); | 175 | glm::vec2 texCoordMaxCorner(viewport.width() * renderRatio / float(selfieTexture->getWidth()), viewport.height() * renderRatio / float(selfieTexture->getHeight())); |
| 178 | 176 | ||