Hello Ignazio,
Thanks..Accoding you I must extend the UpdatCallBack,in this way
class lux : public osg::Drawable::UpdateCallback
{
virtual void operator()( osg::ShapeDrawable* drawable)
{
drawable ->setColor(osg::Vec4(1,1,1,1));
}
};
Is what I speak right?
Well, no, look at the documentation of osg::Drawable::UpdateCallback to
get the right signature for the method you need to override... On the
page I sent you a link to in the previous message, if you clicked on
UpdateCallback, you would have gotten to this page:
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00193.html
Try this instead:
class lux : public osg::Drawable::UpdateCallback
{
virtual void update(osg::NodeVisitor* nv, osg::Drawable* drawable)
{
osg::ShapeDrawable* sd =
dynamic_cast<osg::ShapeDrawable*>(drawable);
sd->setColor(osg::Vec4(1,1,1,1));
}
};
Of course you'll want to add parametrization so you don't just set the
color to white all the time, but that's up to you.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org