I've found a weird behavior in the clone() method when the sub-graph to be cloned has a group with a ParticleSystem (or drawable) directly attached to it.
For instance in this case if you want apply a shallow copy for drawables and a deep copy for nodes and statesets, this piece of code will fail: osg::ref_ptr<osg::Node> copy = static_cast<osg::Node*>(subgraph->clone(osg::CopyOp::DEEP_COPY_NODES | osg::CopyOp::DEEP_COPY_STATESETS)); The "copy" instance will have full copies of ParticleSystems (or drawables) instead of copies by reference. I think this is due to the generic cast to "Node" objects in the Group constructor iteration for copy. (osg version 3.3.2, Group.cpp, line 39). this bug, if verified, could cause performance issues in term of memory footprint. BR, Giuseppe
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
