diff --git a/src/osg/Shader.cpp b/src/osg/Shader.cpp index 7f4fd8eeb..fe73c3aba 100644 --- a/src/osg/Shader.cpp +++ b/src/osg/Shader.cpp @@ -628,12 +628,13 @@ void Shader::PerContextShader::compileShader(osg::State& state) GLint compiled = GL_FALSE; // OSG_NOTICE<<"Compiling PerContextShader "<glShaderSource( _glShaderHandle, 1, &sourceText, NULL ); } else @@ -683,11 +682,11 @@ void Shader::PerContextShader::compileShader(osg::State& state) if (!versionLine.empty()) { - if (osg::getNotifyLevel()>=osg::INFO) + if (printOutShaders) { std::string sourceWithLineNumbers = insertLineNumbers(versionLine + _defineStr + source); - OSG_INFO << "\nCompiling " << _shader->getTypename() - << " source:\n" << sourceWithLineNumbers << std::endl; + OSG_NOTICE << "\nCompiling " << _shader->getTypename() + << " source:\n" << sourceWithLineNumbers << std::endl; } // OSG_NOTICE<<"Shader::PerContextShader::compileShader() : Found #version, lineNum = "<=osg::INFO) + if (printOutShaders) { std::string sourceWithLineNumbers = insertLineNumbers(_defineStr + source); - OSG_INFO << "\nCompiling " << _shader->getTypename() - << " source:\n" << sourceWithLineNumbers << std::endl; + OSG_NOTICE << "\nCompiling " << _shader->getTypename() + << " source:\n" << sourceWithLineNumbers << std::endl; } const GLchar* sourceText[2];