fix mirror ratio on retina

This commit is contained in:
stojce 2014-10-22 09:42:55 +02:00
parent 0d77063e1e
commit a3707a09ae

View file

@ -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
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);