Hi Robert,
Using the new shader composition (ex osgshadercompostion), I was surprised to
detect a lot of redondant call to gluseprogram...
I debugged a few and don't understand well State::push/popDefine and its policy
to invalidate defineMap (defineMap.changed = true; seams to be called at each
push/pop)
(It's difficult to interact since it' s in the header)
The problem seams here since it always tags as changed definemap (and so lead
to some useless passage in State.cpp line 672
Code:
if ((_lastAppliedProgramObject!=0) &&
(previousLastAppliedProgramObject==_lastAppliedProgramObject) &&
_defineMap.changed)
{
// OSG_NOTICE<<"State::apply(StateSet*) Program already applied
("<<(previousLastAppliedProgramObject==_lastAppliedProgramObject)<<") and
_defineMap.changed= "<<_defineMap.changed<<std::endl;
_lastAppliedProgramObject->getProgram()->apply(*this);
}
Hoping this helps you to diagnose the problem :/
Thank you!
Cheers,
Julien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72306#72306
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org