From daf89d5e30aa582a03ec9475641ff5c213d720c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 16 Sep 2010 14:14:35 +0200 Subject: Fixes makeCurrent() failed messages on several systems. Small but important fix for threaded environments. If a thread exits without releasing the current context, it could cause the resource system to get confused. Particularly on Windows, where a DC can only be used in the thread it is retrieved in. We don't need the EGL specific fix anymore since it will have the same effect as a doneCurrent() call. --- src/opengl/qgl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index deac025..d9b094e 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -107,11 +107,10 @@ extern const QX11Info *qt_x11Info(const QPaintDevice *pd); #endif struct QGLThreadContext { -#ifdef QT_OPENGL_ES ~QGLThreadContext() { - eglReleaseThread(); + if (context) + context->doneCurrent(); } -#endif QGLContext *context; }; -- cgit v0.12