summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-05 09:47:32 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-06-09 10:48:11 (GMT)
commitd6f171c9baa61858aea0db36fd8b1bd3219ffd0b (patch)
treebc2aa254f61623f0d7478ca12f1b1f8b714c8de8 /src/opengl/gl2paintengineex/qglengineshadermanager.cpp
parent2de2018a33ea45b32963378bb4f7ef24cd181485 (diff)
downloadQt-d6f171c9baa61858aea0db36fd8b1bd3219ffd0b.zip
Qt-d6f171c9baa61858aea0db36fd8b1bd3219ffd0b.tar.gz
Qt-d6f171c9baa61858aea0db36fd8b1bd3219ffd0b.tar.bz2
Improved clipping in GL2 paint engine.
Use the stencil method to draw clip paths and regions to the Z-buffer instead of using glClear / glScissor. Using different depth values for the various clip parts also makes restore() very cheap when only IntersectClip is used. As an additional bonus this patch gives antialiased clip in the GL 2 paint engine. Task-number: 254658 Reviewed-by: Trond
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index ea57fdf..5c541d0 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -157,6 +157,7 @@ QGLEngineShaderManager::QGLEngineShaderManager(QGLContext* context)
simpleShaderProg->addShader(compiledShaders[PositionOnlyVertexShader]);
simpleShaderProg->addShader(compiledShaders[MainFragmentShader]);
simpleShaderProg->addShader(compiledShaders[ShockingPinkSrcFragmentShader]);
+ simpleShaderProg->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR);
simpleShaderProg->link();
if (!simpleShaderProg->isLinked()) {
qCritical() << "Errors linking simple shader:"
@@ -444,7 +445,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg()
requiredProgram.program->addShader(requiredProgram.compositionFragShader);
// We have to bind the vertex attribute names before the program is linked:
- requiredProgram.program->bindAttributeLocation("inputVertex", QT_VERTEX_COORDS_ATTR);
+ requiredProgram.program->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR);
if (useTextureCoords)
requiredProgram.program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR);