From 4e4228e0b1c01edada84d82746e3360aeffeb037 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 11 Apr 2014 16:21:54 +0200 Subject: Support shutting down the render thread without an OpenGL context. [ChangeLog][QtQuick][SceneGraph] There might not be an OpenGL context bound when QQuickWindow::sceneGraphInvalidated() is emitted if an error occurs while cleaning up the scene graph (such as EGL_CONTEXT_LOST). This is according to the documentation, but has never occurred in practice before. Change-Id: I13dbfbb4b6d0d27fa42fcb8b54df16ea02284807 Reviewed-by: Laszlo Agocs Reviewed-by: Sean Harmer --- src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp') diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 04f2bc891b..791e06ece2 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -836,10 +836,12 @@ static void qsg_wipeBatch(Batch *batch, QOpenGLFunctions *funcs) Renderer::~Renderer() { - // Clean up batches and buffers - for (int i=0; i