Changed the info log so that it output to INFO on success, to WARN when an
error has occured.
This commit is contained in:
parent
460c77b7f0
commit
679c44f4ae
@ -2172,18 +2172,26 @@ void Program::PerContextProgram::linkProgram()
|
||||
_isLinked = (linked == GL_TRUE);
|
||||
if( ! _isLinked )
|
||||
{
|
||||
osg::notify(osg::WARN) << "glLinkProgram \""
|
||||
<< _program->getName() << "\" FAILED" << std::endl;
|
||||
osg::notify(osg::WARN) << "glLinkProgram \""<< _program->getName() << "\" FAILED" << std::endl;
|
||||
|
||||
std::string infoLog;
|
||||
if( getInfoLog(infoLog) )
|
||||
{
|
||||
osg::notify(osg::WARN) << "Program \""
|
||||
<< _program->getName() << "\" infolog:\n" << infoLog << std::endl;
|
||||
osg::notify(osg::WARN) << "Program \""<< _program->getName() << "\" "
|
||||
"infolog:\n" << infoLog << std::endl;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string infoLog;
|
||||
if( getInfoLog(infoLog) )
|
||||
{
|
||||
osg::notify(osg::INFO) << "Program \""<< _program->getName() << "\" "<<
|
||||
"link succeded, infolog:\n" << infoLog << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// build _uniformInfoMap
|
||||
GLint numUniforms = 0;
|
||||
|
@ -326,14 +326,24 @@ void Shader::PerContextShader::compileShader()
|
||||
{
|
||||
osg::notify(osg::WARN) << _shader->getTypename() << " glCompileShader \""
|
||||
<< _shader->getName() << "\" FAILED" << std::endl;
|
||||
|
||||
std::string infoLog;
|
||||
if( getInfoLog(infoLog) )
|
||||
{
|
||||
osg::notify(osg::WARN) << _shader->getTypename() << " Shader \""
|
||||
<< _shader->getName() << "\" infolog:\n" << infoLog << std::endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string infoLog;
|
||||
if( getInfoLog(infoLog) )
|
||||
{
|
||||
osg::notify(osg::INFO) << _shader->getTypename() << " Shader \""
|
||||
<< _shader->getName() << "\" infolog:\n" << infoLog << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::string infoLog;
|
||||
if( getInfoLog(infoLog) )
|
||||
{
|
||||
osg::notify(osg::INFO) << _shader->getTypename() << " Shader \""
|
||||
<< _shader->getName() << "\" infolog:\n" << infoLog << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
bool Shader::PerContextShader::getInfoLog( std::string& infoLog ) const
|
||||
|
Loading…
Reference in New Issue
Block a user