The function is not duplicated, but adapted for the needs of that case.
 
Initially, I discarded doing as you suggested because of the large
differences in the implementations of the two. Having reevaluated it
just now, I think it would be possible to bring the new function up a
level and use it instead of the one currently in StandardShadowMap. 

The new function similarly uses context before and after the value, but
is also invariant to the number that is presently there (one reason we
changed the function).  However, it is also more expensive to use. Since
one wouldn't expect to be calling the functions other than during setup,
that might not be an issue.

-Kris


On Thu, 2010-07-08 at 11:16 -0400, Jean-Sébastien Guay wrote:
> Hi Kristopher,
> 
>  > To do this, it
> > introduces a protected (private) function that does the actual search
> > and replace. The implementation is based on the one found in
> > StandardShadowMap.
> 
> I didn't look at the implementation, but did you duplicate the functions 
> from StandardShadowMap, or did you move them up the class hierarchy 
> (into ShadowTechnique for example, even perhaps static if possible) so 
> both StandardShadowMap and {Soft}ShadowMap can use them? I would prefer 
> the latter of course...
> 
> Just wondering, good change in any case.
> 
> J-S

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to