Changed the debug output so that the code path is not run unless it's needed

This commit is contained in:
Robert Osfield
2009-06-19 13:53:35 +00:00
parent 9559498db6
commit 4d19bed7f2

View File

@@ -380,9 +380,13 @@ void Shader::PerContextShader::compileShader()
_needsCompile = false;
std::string sourceWithLineNumbers = insertLineNumbers(_shader->getShaderSource());
osg::notify(osg::INFO)
<< "\nCompiling " << _shader->getTypename()
<< " source:\n" << sourceWithLineNumbers << std::endl;
if (osg::getNotifyLevel()>=osg::INFO)
{
osg::notify(osg::INFO)
<< "\nCompiling " << _shader->getTypename()
<< " source:\n" << sourceWithLineNumbers << std::endl;
}
GLint compiled = GL_FALSE;
const char* sourceText = _shader->getShaderSource().c_str();