diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-03-27 02:22:04 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-03 09:13:48 (GMT) |
commit | 0b97a00eae721304a31642fcb8892b66fb670f9e (patch) | |
tree | 2da67bd841fb2885cc0ca4ebdd365de6a1f9b768 | |
parent | 2cb3823e440116f331c0287b29667f7c448e3ed0 (diff) | |
download | Qt-0b97a00eae721304a31642fcb8892b66fb670f9e.zip Qt-0b97a00eae721304a31642fcb8892b66fb670f9e.tar.gz Qt-0b97a00eae721304a31642fcb8892b66fb670f9e.tar.bz2 |
Bug in QGLShaderProgram::addShader() that stopped partial shaders working.
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 934b5a5..3c19434 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -849,13 +849,16 @@ bool QGLShaderProgram::addShader(QGLShader *shader) return false; if (d->shaders.contains(shader)) return true; // Already added to this shader program. - if (d->program && shader && shader->d->shader) { + if (d->program && shader) { if (!shader->d->compiled) return false; - if (!shader->d->isPartial) + if (!shader->d->isPartial) { + if (!shader->d->shader) + return false; glAttachShader(d->program, shader->d->shader); - else + } else { d->hasPartialShaders = true; + } d->linked = false; // Program needs to be relinked. d->shaders.append(shader); return true; |