summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_mac.mm')
-rw-r--r--src/opengl/qgl_mac.mm18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index a3d9c72..063082b 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -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.
@@ -493,11 +493,7 @@ void QGLContext::makeCurrent()
#else
[static_cast<NSOpenGLContext *>(d->cx) makeCurrentContext];
#endif
- currentCtx = this;
- if (!qgl_context_storage.hasLocalData() && QThread::currentThread())
- qgl_context_storage.setLocalData(new QGLThreadContext);
- if (qgl_context_storage.hasLocalData())
- qgl_context_storage.localData()->context = this;
+ QGLContextPrivate::setCurrentContext(this);
}
#ifndef QT_MAC_USE_COCOA
@@ -656,9 +652,7 @@ void QGLContext::doneCurrent()
)
return;
- currentCtx = 0;
- if (qgl_context_storage.hasLocalData())
- qgl_context_storage.localData()->context = 0;
+ QGLContextPrivate::setCurrentContext(0);
#ifndef QT_MAC_USE_COCOA
aglSetCurrentContext(0);
#else