Hi Basil,
Thanks for starting a separate topic :-)
How can I give these line segments thickness and color? Also, is this the best
way to plot line segments?
You want to use<osg/LineWidth> for this if you're using the FFP.
Jeremy answered for thickness, I'll answer for color: Just set a color
array on your geometry (either one element with BIND_OVERALL if you want
the same color for all lines, or one color per vertex and
BIND_PER_VERTEX otherwise - and you can then either set the same color
for both vertices in a segment, or a different color and OpenGL will
interpolate the color between the endpoints).
You'll almost certainly also want to turn off lighting for your lines,
unless you can calculate a good normal vector from all points of view...
stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
or if you use shaders, just use a shader that uses vertex colors
directly and calculates no lighting.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org