Hi For all.
Does anyone had such problem ?
I'm using a system that merges calls between pure openscenegraph updates and
opengl updates. And I also have a component (PositionAttitudeTransform) with
a couple of child drawing objects that must be connected each other by a
simple line....
But when I try to add a new line as a common glBegin( GL_LINES ) under
openscenegraph, the drawing is rendered as LINE_STIPPLE, even if I change it
from LINES to LINE_LOOP or other stuff...
A don't know if StateSet could resolve the problem. Because I've already
tried to use it but I guess that I did not make the correct code struct for
its calling, and the results were the same.
Also, if I use standalone openscenegraph application based on
osgViewer, the following code (applied to the compound GL-OSG system) works
with no problem:
/*********************************************************************************************************************************/
Symbol *s1 = getSymbol( str_symbol1 );
Symbol *s2 = getSymbol( str_symbol2 );
osg::Vec3 p1 = s1->getPosition();
osg::Vec3 p2 = s2->getPosition();
osg::Vec4 color = s1->getTextColor();
osg::ref_ptr< osg::Geometry > line = new osg::Geometry;
osg::ref_ptr< osg::Vec3Array > vertex = new osg::Vec3Array;
vertex->push_back( p1 );
vertex->push_back( p2 );
line->setVertexArray( vertex.get() );
/// the problem should be resolved here with osg::DrawArrays::LINES
declaration
osg::ref_ptr< osg::DrawArrays > vindex = new osg::DrawArrays(
osg::DrawArrays::LINES, 0, 2 );
line->addPrimitiveSet( vindex.get() );
/*********************************************************************************************************************************/
Thanks anyway if anyone spend a time reading the message
I'm new to openscenegraph with just a couple of tests as experience and a
complex system that already use osg to be studied in my hands....
Kindly
Andre
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org