mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
fix mirror ratio on retina
This commit is contained in:
parent
0d77063e1e
commit
a3707a09ae
1 changed files with 0 additions and 1 deletions
|
@ -3083,7 +3083,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
|
// if not rendering the billboard, the region is in device independent coordinates; must convert to device
|
||||||
QSize size = getTextureCache()->getFrameBufferSize();
|
QSize size = getTextureCache()->getFrameBufferSize();
|
||||||
float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio();
|
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;
|
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);
|
glViewport(x, size.height() - y - height, width, height);
|
||||||
glScissor(x, size.height() - y - height, width, height);
|
glScissor(x, size.height() - y - height, width, height);
|
||||||
|
|
Loading…
Reference in a new issue