diff options
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 |