Changed the debug output so that the code path is not run unless it's needed
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user