From f34ec1fff6c2c62864a86c346e1ecd1364c83293 Mon Sep 17 00:00:00 2001 From: Wieland Hagen Date: Wed, 24 Feb 2016 19:21:39 +0100 Subject: Catch more cases where Frame rendering was incomplete All these cases need to force drawing the next frame, even if no scene change events were registered Change-Id: I850018870c6d83f0a06c28633eaa202dccfacc9d Reviewed-by: Sean Harmer --- src/render/backend/renderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp index 28b24b4b2..3afc92731 100644 --- a/src/render/backend/renderer.cpp +++ b/src/render/backend/renderer.cpp @@ -633,8 +633,10 @@ uint Renderer::submitRenderViews(const QVector &renderView // TODO: Investigate if it's worth providing a fallback offscreen surface // to use when surface is null. Or if we should instead expose an // offscreensurface to Qt3D. - if (!surface) + if (!surface) { + m_lastFrameCorrect.store(0); continue; + } if (surface != previousSurface && previousSurface) m_graphicsContext->endDrawing(lastBoundFBOId == m_graphicsContext->defaultFBO()); @@ -644,6 +646,7 @@ uint Renderer::submitRenderViews(const QVector &renderView // next RenderView. We won't get the full frame but we may get something if (!m_graphicsContext->beginDrawing(surface, previousClearColor)) { qWarning() << "Failed to make OpenGL context current on surface"; + m_lastFrameCorrect.store(0); continue; } -- cgit v1.2.3