Hi All, I found at least two problems related to osgFX::Outline. First of all, turning off lightning on a child node then the outline seems inheriting that option.
Here is basically the code: Code: void ControlPoints::insertMarker(size_t iIndex, const viframework::vimath::Point<double>& iPoint) { osg::ref_ptr<osg::AutoTransform> transform = new osg::AutoTransform(); transform->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_SCREEN); transform->setAutoScaleToScreen(true); transform->setMinimumScale(0.0); transform->setMaximumScale(FLT_MAX); transform->setPosition(osg::Vec3(iPoint.x(), iPoint.y(), iPoint.z())); transform->addChild(buildFlagWithOutlineEffect(30.0)); root->addChild(transform); viroad::viosg::SceneManager::instance().setDirty(); } osg::Node* ControlPoints::buildFlagWithOutlineEffect(float height) { osgFX::Outline* outline = new osgFX::Outline; outline->setWidth(5); outline->setColor(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f)); Flag* flag = new Flag(height); //flag->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); outline->addChild(flag); return outline; } In attachment you can see the different behaviour. I would like to disable lightning on the flag but have a red outline. About the second problem I will open a different topic. Cheers, Gianni ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68407#68407
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org