aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-16 13:59:10 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-17 15:56:45 +0100
commit623a9bc4c7804693230748d1e2efc1b3ac00e86e (patch)
tree6b44b128edda0f6ad2d1bf1272098604a6038d04 /examples/quick
parentb00154d41a96d15f138ac8552da6a6292c43f547 (diff)
rendercontrol example: calculate fbo size correctly
Take device pixel ratio into account. Change-Id: I729d562ad9523e11ee304136f668f496d4e00f37 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/rendercontrol/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/rendercontrol/window.cpp b/examples/quick/rendercontrol/window.cpp
index 4813936538..f34401bf40 100644
--- a/examples/quick/rendercontrol/window.cpp
+++ b/examples/quick/rendercontrol/window.cpp
@@ -139,7 +139,7 @@ void Window::createFbo()
{
// The scene graph has been initialized. It is now time to create an FBO and associate
// it with the QQuickWindow.
- m_fbo = new QOpenGLFramebufferObject(size(), QOpenGLFramebufferObject::CombinedDepthStencil);
+ m_fbo = new QOpenGLFramebufferObject(size() * devicePixelRatio(), QOpenGLFramebufferObject::CombinedDepthStencil);
m_quickWindow->setRenderTarget(m_fbo);
}