CR for Job #20143 - BUG: Rearview mirror rendering at wrong size
Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3105,7 +3105,6 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 3104 unmodified lines | |||
| 3105 | // if not rendering the billboard, the region is in device independent coordinates; must convert to device | 3105 | // if not rendering the billboard, the region is in device independent coordinates; must convert to device |
| 3106 | QSize size = getTextureCache()->getFrameBufferSize(); | 3106 | QSize size = getTextureCache()->getFrameBufferSize(); |
| 3107 | float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio(); | 3107 | float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio(); |
| 3108 | ratio = size.height() / (float)_glWidget->getDeviceHeight(); | ||
| 3109 | int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio; | 3108 | int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio; |
| 3110 | glViewport(x, size.height() - y - height, width, height); | 3109 | glViewport(x, size.height() - y - height, width, height); |
| 3111 | glScissor(x, size.height() - y - height, width, height); | 3110 | glScissor(x, size.height() - y - height, width, height); |