Added commented out debug output to make it easier to test in future
This commit is contained in:
@@ -633,7 +633,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
|
||||
|
||||
GLint compiled = GL_FALSE;
|
||||
|
||||
// OSG_NOTICE<<"Compiling PerContextShader "<<this<<" ShaderDefine="<<getDefineString()<<std::endl;
|
||||
// OSG_NOTICE<<"Compiling PerContextShader "<<this<<" DefineString="<<getDefineString()<<std::endl;
|
||||
|
||||
if (_defineStr.empty())
|
||||
{
|
||||
@@ -675,21 +675,26 @@ void Shader::PerContextShader::compileShader(osg::State& state)
|
||||
|
||||
if (!versionLine.empty())
|
||||
{
|
||||
// OSG_NOTICE<<"Shader::PerContextShader::compileShader() : Found #version, lineNum = "<<lineNum<<" ["<<versionLine<<"] new source = ["<<source<<"]"<<std::endl;
|
||||
const GLchar* sourceText[3];
|
||||
//OSG_NOTICE<<"glShaderSource() ["<<versionLine<<"] "<<std::endl<<"["<<_defineStr<<"], ["<<sourceText<<"]"<<std::endl;
|
||||
sourceText[0] = reinterpret_cast<const GLchar*>(versionLine.c_str());
|
||||
sourceText[1] = reinterpret_cast<const GLchar*>(_defineStr.c_str());
|
||||
sourceText[2] = reinterpret_cast<const GLchar*>(source.c_str());
|
||||
_extensions->glShaderSource( _glShaderHandle, 3, sourceText, NULL );
|
||||
|
||||
|
||||
// OSG_NOTICE<<" Version Line : ["<<std::endl<<versionLine<<"]"<<std::endl;
|
||||
// OSG_NOTICE<<" DefineStr : ["<<std::endl<<_defineStr<<"]"<<std::endl;
|
||||
// OSG_NOTICE<<" Source : ["<<std::endl<<source<<"]"<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
const GLchar* sourceText[2];
|
||||
//OSG_NOTICE<<"glShaderSource() ["<<_defineStr<<"], ["<<sourceText<<"]"<<std::endl;
|
||||
sourceText[0] = reinterpret_cast<const GLchar*>(_defineStr.c_str());
|
||||
sourceText[1] = reinterpret_cast<const GLchar*>(source.c_str());
|
||||
_extensions->glShaderSource( _glShaderHandle, 2, sourceText, NULL );
|
||||
|
||||
// OSG_NOTICE<<" DefineStr : ["<<std::endl<<_defineStr<<"]"<<std::endl;
|
||||
// OSG_NOTICE<<" Source : ["<<std::endl<<source<<"]"<<std::endl;
|
||||
}
|
||||
}
|
||||
_extensions->glCompileShader( _glShaderHandle );
|
||||
|
||||
Reference in New Issue
Block a user