[osg-users] question about drawing/modifying lines in OpenSceneGraph

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Fri Nov 6 12:18:54 PST 2009


Hello Dat,

> - Can I change the color of the line? If yes, please tell me how.

osg::Vec4Array* c = new osg::Vec4Array;
c->push_back(osg::Vec4(1,0,0,1));		// red
geo->setColorArray(c);
geo->setColorBinding(osg::Geometry::BIND_OVERALL);

> - Can I change the thickness of the line? If yes, pleas tell me how.

Search for osg::LineWidth in the OSG examples.

Hope this helps,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/


More information about the osg-users mailing list