Hi JP,

Sorry, "primitives" is a bit vague. I normally make separate (sometimes to set e.g. renderbin number on each) osg::Geometry, each with single addPrimitiveSet. I have not tried multiple addPrimitiveSet on single geometry, but think/hope it should also be OK and share the vertex array.

Yes all primitive sets in an osg::Geometry use the same vertex array, but then you can only have one normal array (it's setNormalArray() and not addNormalArray()), so you have to go back to what I said and duplicate vertices to be able to get the effect the OP wanted... That's what I meant.

Both solutions are good, it depends on how much duplication will result (for my solution) and how many and how large osg::Geometry objects you will get (for your solution). In general video cards work best with rather large batches of geometry sent in one shot, so I expect the duplication scenario to be a bit faster, but it depends on the bottleneck of course.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to