Hi, I'm a new user needing to load a simple shapefile with a set of geographical lines into my scene. By default its lines are black, while I need to turn them to white.
Looking around in the web and on this forum, I found how to change line thickness usign an LineWidth object set to the model node, but no information on how change line color of a only-lines model. The Material object seems to not do the job: Code: osg::ref_ptr<osg::Node> modelNode = osgDB::readNodeFile(shapefilename); osg::ref_ptr<osg::Material> nodeMaterial = new osg::Material; nodeMaterial->setDiffuse (osg::Material::FRONT_AND_BACK, osg::Vec4(1.0, 1.0, 1.0, 1.0)); modelNode->getOrCreateStateSet()->setAttributeAndModes(nodeMaterial, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); What do you suggest to do? Thank you! Cheers, Luca ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60882#60882 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

