Hi Robert, > So yes, UNSPECIFIED help solve the problem of deciding what data variance an > StateAttribute should have, if the user has explicitly set STATIC or DYNAMIC > then this is a formal decision made by the user and its inappropriate to > override this with automatic codes that try to work out what data variance is > appropriate. However, if the DataVariance is UNSPECIFIED then its just that, > on creation it isn't know how it'll be used and whether it'll vary or not.
Thanks for the clarification. Indeed it makes sense to have UNSPECIFIED variance right after creation. Talking about responsibilities, perhaps it's not the optimizer that has to be fixed. If we assume that whoever creates an object is responsible of setting its data variance (while still making it possible to external users to override that setting), then all plugins that read foreign formats should set a meaningful variance flag based on how they create the scene graph internally. In this scenario, the optimizer doesn't need to guarantee that data variance after optimization is fully specified on all objects, so it wouldn't require any modifications. If you agree, I can patch the LWO reader so that it sets state attributes' variance to STATIC. This would solve my issue entirely (as I'm only loading LWO files). Code based on older versions of OSG won't be affected by the change, because the default variance flag for state attributes used to be STATIC anyway. Thoughts? Marco
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org