summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 2502069..fec1973 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -282,7 +282,8 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
// We have to bind the vertex attribute names before the program is linked:
cached.program->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR);
- cached.program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR);
+ if (cached.useTextureCoords)
+ cached.program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR);
cached.program->link();
if (!cached.program->isLinked()) {
@@ -491,6 +492,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg()
QGLEngineShaderProg requiredProgram;
requiredProgram.program = 0;
+ requiredProgram.useTextureCoords = useTextureCoords;
// Choose vertex shader main function
QGLEngineSharedShaders::ShaderName mainVertexShaderName = QGLEngineSharedShaders::InvalidShaderName;