summaryrefslogtreecommitdiffstats
path: root/examples/opengl/pbuffers/glwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/pbuffers/glwidget.cpp')
-rw-r--r--examples/opengl/pbuffers/glwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp
index d3b82ff23f..b319951ccd 100644
--- a/examples/opengl/pbuffers/glwidget.cpp
+++ b/examples/opengl/pbuffers/glwidget.cpp
@@ -198,7 +198,7 @@ void GLWidget::orthographicProjection()
void GLWidget::resizeGL(int width, int height)
{
- glViewport(0, 0, width, height);
+ glViewport(0, 0, width * devicePixelRatio(), height * devicePixelRatio());
aspect = (qreal)width / (qreal)(height ? height : 1);
perspectiveProjection();
}