I believe you could use the IndexMeshVisitor will convert the resulting geometry to GL_TRIANGLES.
Glenn Waldron / @glennwaldron On Sun, Jul 22, 2012 at 1:13 AM, Preet <[email protected]> wrote: > Is there anyway to use osgUtil::Tessellator to only get back > GL_TRIANGLE primitives? With the available examples, the tessellator > adds/changes the primitive sets of the osg::Geometry passed to it into > multiple triangle fans, triangle strips, and triangles. I want my > geometry to just consist of GL_TRIANGLE draw calls. > > Also, there's another method of using the tessellator where it looks > like you manually define contours / add vertices, etc, but I can't > figure out how to use it. Could anyone provide a small example, or > maybe point out what I'm doing wrong: > > osgUtil::Tessellator myTess; > myTess.setTessellationNormal(offsetVec); > myTess.beginTessellation(); > myTess.beginContour(); > for(int i=0; i < areaVx->size(); i++) { > osg::Vec3 * someVertexPtr = &someVertex; > myTess.addVertex(someVertexPtr); > } > myTess.endContour(); > myTess.endTessellation(); > > std::cout << "Num Contours " << myTess.getContours().size(); // > gives me a zero > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

