diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-15 12:17:22 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-15 13:43:59 (GMT) |
commit | 60d2026c8fc9295df2777a84e7831dbea07560d8 (patch) | |
tree | 9d4db2d351a7a8abc8626471410f07315ac16fdb /src/opengl | |
parent | f42f5c457b3368adb4c92e521dc56969f138bdd3 (diff) | |
download | Qt-60d2026c8fc9295df2777a84e7831dbea07560d8.zip Qt-60d2026c8fc9295df2777a84e7831dbea07560d8.tar.gz Qt-60d2026c8fc9295df2777a84e7831dbea07560d8.tar.bz2 |
Silenced GLSL compiler warning on Mac OS X
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 4 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 2 |
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 && |