summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-02 18:40:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-02 18:40:25 (GMT)
commit80e77bafd87a11d84e41ecc5fae1bb7faef0a8c2 (patch)
tree2eef97394e8347c6f8876b1ab05849fcc6dfc9c4 /src/opengl/qglshaderprogram.cpp
parentb4e64dc59fb860f16600e13061bd588b90c213fb (diff)
parent428ee93fa4a7d2973f61b0c466fbdb12335449a1 (diff)
downloadQt-80e77bafd87a11d84e41ecc5fae1bb7faef0a8c2.zip
Qt-80e77bafd87a11d84e41ecc5fae1bb7faef0a8c2.tar.gz
Qt-80e77bafd87a11d84e41ecc5fae1bb7faef0a8c2.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: print out which GLSL shader that failed compilation for better debugging QSystemTrayIcon::messageTimeout() signal implemented --warn compile with debug defined enabled
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r--src/opengl/qglshaderprogram.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 74382b0..1f39884 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -260,10 +260,27 @@ bool QGLShaderPrivate::compile(QGLShader *q)
glGetShaderInfoLog(shader, value, &len, logbuf);
log = QString::fromLatin1(logbuf);
QString name = q->objectName();
+
+ char *types[] = {
+ "Fragment",
+ "Vertex",
+ "Geometry",
+ ""
+ };
+
+ char *type = types[3];
+ if (shaderType == QGLShader::Fragment)
+ type = types[0];
+ else if (shaderType == QGLShader::Vertex)
+ type = types[1];
+ else if (shaderType == QGLShader::Geometry)
+ type = types[2];
+
if (name.isEmpty())
- qWarning() << "QGLShader::compile:" << log;
+ qWarning("QGLShader::compile(%s): %s", type, qPrintable(log));
else
- qWarning() << "QGLShader::compile[" << name << "]:" << log;
+ qWarning("QGLShader::compile(%s)[%s]: %s", type, qPrintable(name), qPrintable(log));
+
delete [] logbuf;
}
return compiled;