Hello Wojtek,

* osgShadow::ShadowMap has a setLight(osg::LightSource) - not that
important because I can just setLight(lightSource->getLight()) but might
be nice to include anyways.

Frankly, this was a deliberate choice. Light casting shadows is selected by
osg::Light ptr during cull phase. I wanted to make it clear for users. I
know that osgShadow::ShadowMap has setLightSource method but I believe that
its not safe. If users call ShadowMap::setLightSource then change Light for
this lightSource ShadowMap may start to find other lights in cull phase and
cast wrong shadows.

If you look at the code, the LightSource is not used for anything. Here is osgShadow::ShadowMap::setLight(osg::LightSource*) :

  void ShadowMap::setLight(osg::LightSource* ls)
  {
      _ls = ls;
      _light = _ls->getLight();
  }

And then _ls is not used anywhere else, only _light is used. So it's in effect the same as calling setLight(osg::Light*), passing ls->getLight() as a parameter. I don't think there's any harm in providing that kind of "convenience method" to users.

About the other methods, it's really not a problem, I just wanted to give you some more information from someone porting from osgShadow::ShadowMap.

If its not secret goverment project ;-) you may send it to me and I may try
to fix it. There is a chance that this is the issue I observed and fixed
recently.

That's not feasible unfortunately. I may try to make a minimal example based on OSG 2.2 to see if the problem is reproducible there.

Nope, no idea. Its interesting because this array is only used when
Debug HUD is active.

I really think it's not related to the Vec3dArray. It must be something else. Perhaps we are adding callbacks that are replacing the ones you have in your code, or something like that. As I said, I didn't have time to investigate that much.

Thanks for support, I have refactored LispSM to use templates and fixed the
issue I mentioned last time.

Sounds great! I look forward to trying out your changes when I come back.

I am also planning some vacations this month.

Have a nice vacation,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to