diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-02 12:18:10 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-02 12:52:16 (GMT) |
commit | abef77a3fa1e4d2f6a44b323672db8ccbbd2b03f (patch) | |
tree | 6302736dbdbdad0c32c2e9f813a0fb5d9b13c606 /src/opengl/qgl.cpp | |
parent | dbc2bc6deb8a0d44cafe8c8d6c6905c689aa018f (diff) | |
download | Qt-abef77a3fa1e4d2f6a44b323672db8ccbbd2b03f.zip Qt-abef77a3fa1e4d2f6a44b323672db8ccbbd2b03f.tar.gz Qt-abef77a3fa1e4d2f6a44b323672db8ccbbd2b03f.tar.bz2 |
Split QGLEngineShaderManager into a shared and a per engine part.
Both the shaders and the engine states were shared between OpenGL
contexts, but the states should be only apply to one context, not a
group of contexts. This commit separates the shaders and the states.
Task-number: 257254
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 8b7674e..1d765f8 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4922,13 +4922,13 @@ void QGLShareRegister::removeShare(const QGLContext *context) { QGLContextResource::QGLContextResource(FreeFunc f, QObject *parent) : QObject(parent), free(f) { - connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), this, SLOT(aboutToDestroyContext(const QGLContext *))); + connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), this, SLOT(removeOne(const QGLContext *))); } QGLContextResource::~QGLContextResource() { while (!m_resources.empty()) - remove(m_resources.begin().key()); + removeGroup(m_resources.begin().key()); } void QGLContextResource::insert(const QGLContext *key, void *value) @@ -4976,7 +4976,7 @@ void *QGLContextResource::value(const QGLContext *key) return it.value(); } -void QGLContextResource::remove(const QGLContext *key) +void QGLContextResource::removeGroup(const QGLContext *key) { QList<const QGLContext *> shares = qgl_share_reg()->shares(key); if (shares.size() == 0) @@ -5000,7 +5000,7 @@ void QGLContextResource::remove(const QGLContext *key) } } -void QGLContextResource::aboutToDestroyContext(const QGLContext *key) +void QGLContextResource::removeOne(const QGLContext *key) { ResourceHash::iterator it = m_resources.find(key); if (it == m_resources.end()) |