diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-09-16 08:22:48 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-09-16 08:22:48 (GMT) |
commit | 78f0dd0f00506139eab54e7dc50f8980df78da63 (patch) | |
tree | 9ec0f0256618446f4dd08be34eceb51852984074 /src/opengl/qgl_wince.cpp | |
parent | 5d35dbc3552f722cf4de220d8737e8201e4f61e5 (diff) | |
parent | 30377d51a8568b9b778b58a63fb036e35a879124 (diff) | |
download | Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.zip Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.tar.gz Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/opengl/qgl_wince.cpp')
-rw-r--r-- | src/opengl/qgl_wince.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index a26d491..4e655f1 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtOpenGL module of the Qt Toolkit. @@ -20,10 +21,9 @@ ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. @@ -450,13 +450,8 @@ void QGLContext::makeCurrent() return; } - if (d->eglContext->makeCurrent()) { - if (!qgl_context_storage.hasLocalData() && QThread::currentThread()) - qgl_context_storage.setLocalData(new QGLThreadContext); - if (qgl_context_storage.hasLocalData()) - qgl_context_storage.localData()->context = this; - currentCtx = this; - } + if (d->eglContext->makeCurrent()) + QGLContextPrivate::setCurrentContext(this); } @@ -467,9 +462,7 @@ void QGLContext::doneCurrent() if (d->eglContext) d->eglContext->doneCurrent(); - if (qgl_context_storage.hasLocalData()) - qgl_context_storage.localData()->context = 0; - currentCtx = 0; + QGLContextPrivate::setCurrentContext(0); } void QGLContext::swapBuffers() const @@ -730,7 +723,14 @@ void QGLExtensions::init() if (init_done) return; init_done = true; + + // We need a context current to initialize the extensions. + QGLWidget tmpWidget; + tmpWidget.makeCurrent(); + init_extensions(); + + tmpWidget.doneCurrent(); } QT_END_NAMESPACE |