[osg-users] request for small change in StandardShadowMap.cpp
Trajce Nikolov NICK
trajce.nikolov.nick at gmail.com
Fri May 1 09:15:52 PDT 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150501/959ee1a3/attachment-0002.htm>
More information about the osg-users
mailing list