Hi Aurelien, On 2 July 2013 13:12, Aurelien Albert <[email protected]> wrote: > Previously I used the "getDecorator()" to set a osg::Program which render the > statistics. > > Now I use the "getCamera()" method to set the same osg::Program which render > the statistics. > > But to get it work properly, I have to had this : > > pStatsHandler->getCamera()->getOrCreateStateSet()->setAttributeAndModes(new > osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, > osg::BlendFunc::ONE_MINUS_SRC_ALPHA)); > > Maybe there is some changes in the default attribute values due to the > revision 13604 ?
I was meaning to check up on the defaults as the StatsHandler's Camera's StateSet didn't have any default set on it, and since SceneView wasn't applying any there is potential difference. Standard View(er)::Camara StateSet already have StateSet::setGlobalDefaults() called on them in the osg::View constructor so will have things like the BlendFunc already applied so won't be affected by this change. While all the HUD Camera applied like StatsHandler will now have to call StateSet::setGlobalDefaults() if they need it. The new scheme is the correct way to do though, what the user sets should be passed to OpenGL without the OSG deciding it knows best. After lunch I'll have a look at the default state issue in the StatsHandler and other hud style handlers like it. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
