diff options
author | Sarah Smith <sarah.j.smith@nokia.com> | 2009-10-01 05:54:19 (GMT) |
---|---|---|
committer | Sarah Smith <sarah.j.smith@nokia.com> | 2009-10-01 05:54:19 (GMT) |
commit | e5fcac23463702435136ee18f91668aa0d6601a3 (patch) | |
tree | 3188719b0cfcdb73d4630c40e65ade5f6ce7d3fe /src | |
parent | 059d40d3f918f658041ec20ba04f9d010cfc0fa7 (diff) | |
parent | 5da322990a5002d8c827578efad7b210716f1c15 (diff) | |
download | Qt-e5fcac23463702435136ee18f91668aa0d6601a3.zip Qt-e5fcac23463702435136ee18f91668aa0d6601a3.tar.gz Qt-e5fcac23463702435136ee18f91668aa0d6601a3.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 8 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index eceed06..fcb20b4 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -78,7 +78,7 @@ const char* QGLEngineSharedShaders::qglEngineShaderSourceCode[] = { }; QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) - : ctx(QGLContextPrivate::contextGroup(context)) + : ctxGuard(context) , blitShaderProg(0) , simpleShaderProg(0) { @@ -223,7 +223,7 @@ QGLShader *QGLEngineSharedShaders::compileNamedShader(ShaderName name, QGLShader return compiledShaders[name]; QByteArray source = qglEngineShaderSourceCode[name]; - QGLShader *newShader = new QGLShader(type, ctx->context(), this); + QGLShader *newShader = new QGLShader(type, ctxGuard.context(), this); newShader->compile(source); #if defined(QT_DEBUG) @@ -245,7 +245,7 @@ QGLShader *QGLEngineSharedShaders::compileCustomShader(QGLCustomShaderStage *sta if (newShader) return newShader; - newShader = new QGLShader(type, ctx->context(), this); + newShader = new QGLShader(type, ctxGuard.context(), this); newShader->compile(source); customShaderCache.insert(source, newShader); @@ -273,7 +273,7 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS QGLEngineShaderProg &cached = cachedPrograms.last(); // If the shader program's not found in the cache, create it now. - cached.program = new QGLShaderProgram(ctx->context(), this); + cached.program = new QGLShaderProgram(ctxGuard.context(), this); cached.program->addShader(cached.mainVertexShader); cached.program->addShader(cached.positionVertexShader); cached.program->addShader(cached.mainFragShader); diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index 47d9a2a..fbb6d9c 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -361,7 +361,7 @@ private slots: void shaderDestroyed(QObject *shader); private: - QGLContextGroup *ctx; + QGLSharedResourceGuard ctxGuard; QGLShaderProgram *blitShaderProg; QGLShaderProgram *simpleShaderProg; QList<QGLEngineShaderProg> cachedPrograms; |