Hi Julien, I can't provide an answers without digging deeply in the code, this week I'm really busy with clients so can't look in to. Next week I'll be getting back to the shader_pipeline branch and better able to look into it.
Which version of the OSG are you using? Is the standard osgshadercomposition example generating this issue or is it modified version? How are you detecting up the redundant calls issue? Robert. On 4 November 2017 at 18:03, Julien Valentin <[email protected]> wrote: > 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 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

