<div dir="ltr">Hi Robert,<div><br></div><div>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.</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">StandardShadowMap</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">ViewData</span><span style="color:rgb(0,0,0)">::</span><span style="font-style:italic;color:rgb(0,0,0)">cullShadowReceivingScene</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">_cv</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">pushStateSet</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">_stateset</span><span style="color:rgb(0,0,0)">.</span><span style="color:rgb(0,0,0)">get</span><span style="color:rgb(0,0,0)">()</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#if</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>_st<span style="color:rgb(0,0,0)">-></span>getShadowedScene<span style="color:rgb(0,0,0)">()-></span>osg<span style="color:rgb(0,0,0)">::</span>Group<span style="color:rgb(0,0,0)">::</span>traverse<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span>_cv<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#else</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">_st</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">getShadowedScene</span><span style="color:rgb(0,0,0)">()-></span><span style="font-style:italic;color:rgb(0,0,0)">traverse</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(128,0,0)">_cv</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#endif</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">_cv</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">popStateSet</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal">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?</span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal"><br></span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal">Please let me know and thanks a bunch as always!</span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal"><br></span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal">Nick</span></font></pre><div><br></div>-- <br><div class="gmail_signature">trajce nikolov nick<br></div>
</div></div>