summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_win.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-02-17 11:41:32 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-02-17 11:44:27 (GMT)
commit46e254fcde0aa70851c7c82ebef474c12cf042ef (patch)
treed7ec36ca852216060aeaded42dd1800d6d4b3c04 /src/opengl/qgl_win.cpp
parent364929585a1fa0243acf3a3926626bdd19143447 (diff)
downloadQt-46e254fcde0aa70851c7c82ebef474c12cf042ef.zip
Qt-46e254fcde0aa70851c7c82ebef474c12cf042ef.tar.gz
Qt-46e254fcde0aa70851c7c82ebef474c12cf042ef.tar.bz2
Some threading improvements to the GL module
- Make bindTexture threadsafe - Document which areas of QGLWidget needs locking in order to do out-of-gui thread rendering - Testcases to prove that these cases work Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qgl_win.cpp')
-rw-r--r--src/opengl/qgl_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index b5f952e..5ab944a 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -1280,8 +1280,9 @@ void QGLContext::reset()
void QGLContext::makeCurrent()
{
Q_D(QGLContext);
- if (d->rc == wglGetCurrentContext() || !d->valid) // already current
+ if (d->rc == wglGetCurrentContext() || !d->valid) // already current
return;
+
if (d->win) {
d->dc = GetDC(d->win);
if (!d->dc) {