mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge pull request #3665 from stojce/20143
CR for Job #20143 - BUG: Rearview mirror rendering at wrong size
This commit is contained in:
commit
2dff75dac1
1 changed files with 0 additions and 1 deletions
|
@ -3105,7 +3105,6 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) {
|
|||
// if not rendering the billboard, the region is in device independent coordinates; must convert to device
|
||||
QSize size = getTextureCache()->getFrameBufferSize();
|
||||
float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio();
|
||||
ratio = size.height() / (float)_glWidget->getDeviceHeight();
|
||||
int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio;
|
||||
glViewport(x, size.height() - y - height, width, height);
|
||||
glScissor(x, size.height() - y - height, width, height);
|
||||
|
|
Loading…
Reference in a new issue