Hi Andreas,

I have just had a quick look through and I think your changes reveal a
wider bug - that the code assumes that the only children of the Group
being processed are drawables of some kind.  In reality the children
of a Group can be of any type, so the code really should be adapted
properly to handle children that are Geometry which can be processed
or any other node (including Drawables but technically this no longer
matters.)

I am not in a position to properly review the code, but as this stand
I don't think just merging your changes would be appropriate.  I will
make some time soon to properly look into this and will keep your
changes for reference.

Thanks,
Robert.

On 24 November 2017 at 15:25, Andreas Ekstrand
<[email protected]> wrote:
> Hi,
>
> I think I managed to fix my performance problem in MergeGeometryVisitor. The
> attached Optimizer.cpp, based on 3.5.8, reintroduces code from 3.5.1's
> MergeGeometryVisitor::mergeGeode to the new
> MergeGeometryVisitor::mergeGroup, although somewhat modified from geode to
> group. It references the drawables and clears them to avoid removing them
> one by one - as the comment in the reintroduced code says: "now clear the
> drawable list of the Geode so we don't have to remove items one by one
> (which is slow)".
>
> This also reintroduces use of the standardDrawables list of non-mergable
> drawables that are still collected in 3.5.8 but weren't used before this
> change.
>
> It fixes my problem, since that part now pretty much works as it did before
> Jannik's changes. I hope it's a robust solution and that it will end up in a
> 3.5.9 release soon...
>
> Regards,
> Andreas
>
>
> _______________________________________________
> 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

Reply via email to