Hi,

I tried changing the vertex colors for an openflight model using the following 
functions:

osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array;
int num =  vertex->getNumElements(); 
for (int j = 0; j < num; j++)
        colors->push_back(osg::Vec4(0, 0, 0, 1.0f));                    
geo->setColorArray(colors.get());
geo->setColorBinding(osg::Geometry::BIND_PER_VERTEX);

But it seems to fail.  Just wonder if I am have missed out some important lines 
of codes?

Thank you!

Cheers,
Linda

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





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

Reply via email to