I'm trying to adapt my own code to use some of the stuff from the osgtesselate example. I am drawing a cube using a primitiveSetList putting the indices of the 8 vertices osg::DrawElementsUInt(osg::PrimitiveSet::QUADS,0) instances, then pushing them onto the PrimitiveSetList.
The way the code in the tesselation example works is using DrawArrays and adding them to Geometry instance directly. It appears that every index in each PrimitiveSet corresponds to a unique vertex which is not shared by any other primitive. For the example of my cube, that means I would need 24 vertices instead of 8. Is this what I need to do in order to get the tesselation to work? Please tell me if I am understanding the correctly. The technique of adding PrimitiveSet instances to the Geometry instance creates a contiguous list of vertices with a corresponding list of instructions telling what the specific vertices are for. In contrast, using the PrimitiveSetList approach allows me to reuse vertices through indexing. Are these approaches mutually incompatible? _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
