0
有沒有辦法在調用QGLShaderProgram :: link()時打開日誌消息? http://qt-project.org/doc/qt-4.8/qglshaderprogram.html#linkQt:QGLShaderProgram關閉日誌消息
的消息是這樣的:
QGLShader::link: "Vertex shader(s) linked, fragment shader(s) linked.
"
Qt代碼如下所示: 的src /的OpenGL/qglshaderprogram.cpp:893
glLinkProgram(program);
value = 0;
glGetProgramiv(program, GL_LINK_STATUS, &value);
d->linked = (value != 0);
value = 0;
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &value);
d->log = QString();
if (value > 1) {
char *logbuf = new char [value];
GLint len;
glGetProgramInfoLog(program, value, &len, logbuf);
d->log = QString::fromLatin1(logbuf);
QString name = objectName();
if (name.isEmpty())
qWarning() << "QGLShader::link:" << d->log;
else
qWarning() << "QGLShader::link[" << name << "]:" << d->log;
delete [] logbuf;
}
return d->linked;
}