summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp4
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
2 files changed, 5 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;
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index 423df99..0bb580d 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -245,6 +245,8 @@ struct QGLEngineShaderProg
QVector<uint> uniformLocations;
+ bool useTextureCoords;
+
bool operator==(const QGLEngineShaderProg& other) {
// We don't care about the program
return ( mainVertexShader == other.mainVertexShader &&