summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-01-22 10:10:35 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-01-27 15:30:23 (GMT)
commit3e03a6330de1bf4b96fc990d2204826ffd5d2bb4 (patch)
treee394eee3986dedab285512a4e08cae8080e9adfa
parente6cd01d47cd7da1b34e36b0bc3de7e94429f6d58 (diff)
downloadQt-3e03a6330de1bf4b96fc990d2204826ffd5d2bb4.zip
Qt-3e03a6330de1bf4b96fc990d2204826ffd5d2bb4.tar.gz
Qt-3e03a6330de1bf4b96fc990d2204826ffd5d2bb4.tar.bz2
Fix rendering with simple shader in GL2 engine
Need to bind the PMV matrix's attributes to their indexes in the simple shader, which is created in a seperate code path to all the other shaders. This should fix the qgl autotest failures. Reviewed-By: TrustMe
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 9fd9e18..8183f08 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -184,6 +184,9 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
simpleShaderProg->addShader(vertexShader);
simpleShaderProg->addShader(fragShader);
simpleShaderProg->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR);
+ simpleShaderProg->bindAttributeLocation("pmvMatrix1", QT_PMV_MATRIX_1_ATTR);
+ simpleShaderProg->bindAttributeLocation("pmvMatrix2", QT_PMV_MATRIX_2_ATTR);
+ simpleShaderProg->bindAttributeLocation("pmvMatrix3", QT_PMV_MATRIX_3_ATTR);
simpleShaderProg->link();
if (!simpleShaderProg->isLinked()) {
qCritical() << "Errors linking simple shader:"