Hi Michael,
This process would be made much easier if ocean surface only created a new stateset if a previous one didn't exist. Is there a reason for recreating it?
No reason other than laziness. If any attribute that's being stored in the stateset gets changed, rather than just changing that attribute (and potentially others that depend on it, and so on) and thus scattering the code that creates the state set in many different methods, we just dirty the state set which causes it to be recreated and repopulated in the next frame.
You're welcome to do it differently if you want and submit the change. In fact it would really be nice if you could merge your technique into osgOcean's own code and submit the change. I'm sure many people would appreciate such functionality, if you have the time to do it.
J-S -- ______________________________________________________ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org