Robert, The specific problem I'm addressing is that StateVisitor fails to collapse duplicate StateSets whose attributes are identical yet point to different physical instances.
Attached is a dataset that shows the problem. The file contains exactly 2 StateSets, and they are identical (look under the MatrixTransform nodes). After stepping thought the code myself, I found that the StateVisitor does not consider them to be equal because the CullFace objects do not share the same pointer (each StateSet has its own instance). Thanks again for taking a look. Glenn On Sat, Jun 28, 2008 at 7:48 AM, Robert Osfield <[EMAIL PROTECTED]> wrote: > Hi Glenn, > > The StateVisitor has been working for quite a while, as far as I'm > aware has worked pretty well. > > Is there a specific problem you are addressing? If so could you > provide a dataset that isn't be optimized that you would expect to be > optimized, I can then step through the code and review it thoroghly. > > Cheers, > Robert. > > On Fri, Jun 27, 2008 at 9:18 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > > Robert, > > > > The Optimizer::StateVisitor compares StateSet attributes for pointer > > equality only. This one-line change forces it to compare the attribute > > contents instead of just comparing their pointers, which I believe is the > > right approach for optimization. > > > > Glenn > > > > -- > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : > 703-652-4791 > > _______________________________________________ > > osg-submissions mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > -- Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
out.osg
Description: Binary data
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
