summaryrefslogtreecommitdiffstats
path: root/src/opengl
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
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')
-rw-r--r--src/opengl/qgl_p.h1
-rw-r--r--src/opengl/qglshaderprogram.cpp21
2 files changed, 20 insertions, 2 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 547e457..a32a311 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -509,6 +509,7 @@ Q_SIGNALS:
private slots:
void freeTexture_slot(QGLContext *context, QPixmapData *boundPixmap, GLuint id) {
+ Q_UNUSED(boundPixmap);
#if defined(Q_WS_X11)
if (boundPixmap) {
QGLContext *oldContext = const_cast<QGLContext *>(QGLContext::currentContext());
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;