diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-16 12:14:35 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-16 12:17:41 (GMT) |
commit | daf89d5e30aa582a03ec9475641ff5c213d720c0 (patch) | |
tree | fac41c063c81e25fbece1aad9694bf6786f095f6 /src/opengl | |
parent | c5f1f0ba1cb4784b09dd4553df5c6d3f0d3ad938 (diff) | |
download | Qt-daf89d5e30aa582a03ec9475641ff5c213d720c0.zip Qt-daf89d5e30aa582a03ec9475641ff5c213d720c0.tar.gz Qt-daf89d5e30aa582a03ec9475641ff5c213d720c0.tar.bz2 |
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.
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
1 files 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; }; |