Take device-pixel-ratio into account in openglwindow example
Also affects the windowcontainer example, which includes an OpenGL window. Change-Id: Ic9f0f2aa66410b657e08c0225b085dd8df44e2a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
12045801f7
commit
666f3b4a78
|
|
@ -88,7 +88,8 @@ void OpenGLWindow::render()
|
|||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
m_device->setSize(size());
|
||||
m_device->setSize(size() * devicePixelRatio());
|
||||
m_device->setDevicePixelRatio(devicePixelRatio());
|
||||
|
||||
QPainter painter(m_device);
|
||||
render(&painter);
|
||||
|
|
|
|||
Loading…
Reference in New Issue