diff options
author | Gunnar Sletta <[email protected]> | 2013-10-24 20:44:17 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-10-26 23:53:38 +0200 |
commit | 8d6500560eb5f7f72588d9d01e663a04af592e99 (patch) | |
tree | 1d839947b6bf6bc5ae73167eec6bfa5c127e07bc /src | |
parent | 6041de9ad7ec9407507ea0e77f3588039db28634 (diff) |
Fix rendernode bug and enable rendernode test.
The bug in the renderer was that the viewport was set before
we called the render node, leaving us with the viewport
set by the render node as opposed to the viewport of the
renderer.
The render node API is a crude and intrusive hack which was added for
webkit back in the day. With the introduction of webengine it becomes
less relevant, but it should still work.
Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc
Reviewed-by: Alan Alpert <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index f25e144674..bf31b94e46 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -2031,14 +2031,13 @@ void Renderer::renderBatches() << " -> Alpha: " << qsg_countNodesInBatches(m_alphaBatches) << " nodes in " << m_alphaBatches.size() << " batches..."; } - QRect r = viewportRect(); - glViewport(r.x(), deviceRect().bottom() - r.bottom(), r.width(), r.height()); - for (QHash<QSGRenderNode *, RenderNodeElement *>::const_iterator it = m_renderNodeElements.constBegin(); it != m_renderNodeElements.constEnd(); ++it) { prepareRenderNode(it.value()); } + QRect r = viewportRect(); + glViewport(r.x(), deviceRect().bottom() - r.bottom(), r.width(), r.height()); glClearColor(clearColor().redF(), clearColor().greenF(), clearColor().blueF(), clearColor().alphaF()); #if defined(QT_OPENGL_ES) glClearDepthf(1); |