[osg-users] question about drawing/modifying lines in OpenSceneGraph
Kim Bale
kcbale at googlemail.com
Fri Nov 6 12:25:41 PST 2009
Haha, I had a feeling you'd jump in ;)
K.
2009/11/6 Jeremy Moles <jeremy at emperorlinux.com>:
> On Fri, 2009-11-06 at 14:12 -0600, Nguyen Tien Dat wrote:
>> Dear all,
>> I draw a line as following:
>>
>> osg::Geometry* geo = new osg::Geometry();
>> // define some vertices
>> osg::Vec3Array* v = new osg::Vec3Array;
>> v->push_back(start);
>> v->push_back(end);
>>
>> // draw lines
>> geo->setVertexArray(v);
>>
>> geo->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, 2, 1));
>>
>> geode->addDrawable(geo);
>>
>> But the line is hardly to be seen because it's too thin and has white
>> color. So my question is:
>> - Can I change the color of the line? If yes, please tell me how.
>> - Can I change the thickness of the line? If yes, pleas tell me how.
>
> Out of curiosity, what are you using the line drawing for? And how
> high-quality must the lines be? :)
>
>> Thanks,
>> Dat
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> --
> Follow us on Twitter! http://twitter.com/emperorlinux
>
> EmperorLinux, Inc.
> http://www.emperorlinux.com
> 1-888-651-6686
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
More information about the osg-users
mailing list