Added some debugging to investigate issue of global default ShaderAttribute not being automatically assigned.

This commit is contained in:
Robert Osfield
2010-07-07 11:02:15 +00:00
parent 46b221a832
commit d50bf88bc0
3 changed files with 109 additions and 29 deletions

View File

@@ -23,6 +23,7 @@ ShaderAttribute::ShaderAttribute():
_type(osg::StateAttribute::Type(-1))
{
_shaderComponent = new osg::ShaderComponent;
OSG_NOTICE<<"Creating default constructed ShaderAttribute() "<<this<<std::endl;
}
ShaderAttribute::ShaderAttribute(const ShaderAttribute& sa,const CopyOp& copyop):
@@ -30,6 +31,7 @@ ShaderAttribute::ShaderAttribute(const ShaderAttribute& sa,const CopyOp& copyop)
_type(sa._type),
_uniforms(sa._uniforms)
{
OSG_NOTICE<<"Creating copy constructed ShaderAttribute("<<&sa<<") "<<this<<std::endl;
}
ShaderAttribute::~ShaderAttribute()

View File

@@ -184,6 +184,11 @@ osg::Shader* ShaderComposer::composeMain(const Shaders& shaders)
ref_ptr<Shader> mainShader = new Shader(type, full_source);
OSG_NOTICE<<"type =="<<type<<std::endl;
OSG_NOTICE<<"full_source == "<<std::endl<<full_source<<std::endl;
OSG_NOTICE<<"end of ShaderComposer::composeMain(Shaders)"<<std::endl<<std::endl;
_shaderMainMap[shaders] = mainShader;
return mainShader.get();