Hi,

the attachment contains a correction of the Optimizer::MergeGeometryVisitor.
When 2 geometries are merged, the primitive sets of the second geometry
are copied to the first geometry.

The primitive sets were copied with a std::insert into the first geometry
primitive set vector. It doesn't work when the geometry is using VBOs (because
the element buffer object of the primitive set is not updated).

The correction replaces

lhs.getPrimitiveSetList().insert( lhs.getPrimitiveSetList().end(),
                                 rhs.getPrimitiveSetList().begin(),
                                 rhs.getPrimitiveSetList().end() );

by
for( primItr=rhs.getPrimitiveSetList().begin();
    primItr!=rhs.getPrimitiveSetList().end();
    ++primItr )
{
   lhs.addPrimitiveSet(primItr->get());
}

The attachment contains also 2 files I submitted a few days ago. It corrects
the copy constructor of the Node and Drawable. The state set was copied but not
correctly set (through setStateSet). With the correction, the parent list
of the state set is updated with the new parent.

Attachment: files.tar.bz2
Description: Binary data

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to