Hi Nick, I haven't worked with osgShadow for over a year so it's not fresh in my mind. There are mechanisms for override the state management in osgShadow but I don't recall how widely they are implemented amongst the shadow techniques.
With the proposed change, with the explicit osg::Group::traverse() method there must be a reason why this was done but without a code review and trawl through the svn logs I can't provide the answer. In general overriding the management of osg::Program and other osg::StateSet setting shouldn't require lots of hacks, so if a particular ShadowTechnique is failing in this respect then perhaps this needs looking at. Robert. Robert. On 1 May 2015 at 17:15, Trajce Nikolov NICK <trajce.nikolov.n...@gmail.com> wrote: > Hi Robert, > > I posted a while ago a question how to get the osg::Program associated with > the shaders from the StandardShadowMap in order to extend. And it is localy > defined as you can see in the code. However I found a workaround, by > extending the ShadowingScene and catch the StateSet from the Cull traversal. > But, this will not work since the line below. Here is my proposed change, it > will not hurt anyone I think - these ShadowMap* classes are > over-encapsulated in my opinion. > > void StandardShadowMap::ViewData::cullShadowReceivingScene( ) > > { > > _cv->pushStateSet( _stateset.get() ); > > > #if 0 > > _st->getShadowedScene()->osg::Group::traverse( *_cv ); > > #else > > _st->getShadowedScene()->traverse( *_cv ); > > #endif > > > _cv->popStateSet(); > > } > > > It will be nice if this forcing of osg::Group::traverse is replaced by > ordinary traverse thus anyone can re-write and extend. What you think? > > > Please let me know and thanks a bunch as always! > > > Nick > > > -- > trajce nikolov nick > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org