Hi,

I need to draw a polyline from an array of vertex, that is, I have an array of 
points, for example:

vertex[1] = (1,3,4)
vertex[2] = (7,4,0)
vertex[3] = (5,5,1)
vertex[4] = (1,2,9)

and I need to join them making a line strip:

For this I tried the following code, but it doest'n work, do someone know why 
it doesnt show anything???


Code:
        
osg::Vec3Array* vertices = .............

osg::Geometry* geometry = new osg::Geometry;
geometry->setVertexArray(vertices); 
geometry->addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP, 0, 
vertices->size())); 
geometry->setColorBinding(osg::Geometry::BIND_OVERALL); 

geode->addDrawable(geometry);



Thank you!

Cheers,
Manuel

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28765#28765





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to