Hi Wojtek,

However, I understand that overridng proper Shadow class and their ViewData might be bit more complicated than overriding simpler things like node callback. So as a mid-solution for those lazy or those who don't know how to override a class, I would propose adding SetShadowMapCameraSettingsCallback. If added, this calback will be called whenever shadow camera stateset is filled, if not added default settings will be applied. This way if one needs to change some setings he may simply override calback and make it their way.

I don't think it's being lazy to not want to override a shadow class. It's pretty specialized stuff, and if your overridden class does something wrong it's very easy to cause more problems than you fix. In essence, I think the number of users able to correctly derive from a shadow class to fix some behavior in the original class is pretty small. Not everyone is an experienced OpenGL / real-time graphics developer. Most just want to use OSG and want it to work without having to know the details.

So I'm not sure if the callback mechanism is better than options as you suggested yesterday. One is very focused, the other is very general.

Yes, the callback is more future-proof, but imagine someone who has the same problem as I do. They look at the shadow classes, and they see that they support a SetShadowMapCameraSettingsCallback. What do they do with that? What does the callback have to be? Plus, they will have to set all other settings (which they don't need to change) just to disable one setting... There's too much chance they might make a mistake.

On the other hand, the options you suggested yesterday is much simpler for a user, and we can even document what each setting does, and when you might need to enable/disable it. I think this is more useful to a user who just has a problem and wants to solve it.

I think it's important to keep in mind that OSG evolves with the needs of its users, so you don't have to predict all the settings that might need to be disabled. We can add others as they are needed.

Finally, I'll also remind you that from my point of view, adding AlphaFunc into some statesets in my objects would be a good solution as well, so if you're not comfortable with the options and the callback mechanism, we can just drop the issue. I think my case was pretty specific to our models. If we ever get some other report of the same behavior, we can do something then...

It's up to you.

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

Reply via email to