Re: [osg-users] Program attribute cannot me removed

2014-06-30 Thread Pierre Landes
Hi Robert, Thanks for the advice. Also, the setting of a default Program on top of my scene did the trick for me. :) Cheers, Pierre. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60057#60057

Re: [osg-users] Program attribute cannot me removed

2012-09-05 Thread Robert Osfield
HI Peterakos, Using removeAttribute(osg::StateAttribute::PROGRAM) should work. To test whether it's working try writing the scene graph out to a .osg or .osgt file by doing a osgDB::writeNodeFile(*mySceneGraph,before.osgt); prior to doing the remove then once again with after.osgt once the

Re: [osg-users] Program attribute cannot me removed

2012-09-05 Thread Peterakos
Hello. This is what i did. I disabled it in run time and checked the state set before and after this line: stateset-removeAttribute(osg::StateAttribute::PROGRAM) Before that line the program was in attribute list along with lighting. After that line, only lighting was there. But still the

Re: [osg-users] Program attribute cannot me removed

2012-09-05 Thread Robert Osfield
Hi Peterakos, On 5 September 2012 11:36, Peterakos hay...@gmail.com wrote: I disabled it in run time and checked the state set before and after this line: stateset-removeAttribute(osg::StateAttribute::PROGRAM) Before that line the program was in attribute list along with lighting. After

Re: [osg-users] Program attribute cannot me removed

2012-09-05 Thread Glenn Waldron
On Wed, Sep 5, 2012 at 8:38 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Peterakos, On 5 September 2012 11:36, Peterakos hay...@gmail.com wrote: I disabled it in run time and checked the state set before and after this line: stateset-removeAttribute(osg::StateAttribute::PROGRAM)

[osg-users] Program attribute cannot me removed

2012-09-04 Thread Peterakos
Hello. I face a problem with a program attribute. I enable the program using this: osg::StateSet* stateset = model_node-getOrCreateStateSet(); stateset-setAttributeAndModes( program, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); and i disable it using: osg::StateSet* stateset =

Re: [osg-users] Program attribute cannot me removed

2012-09-04 Thread Peterakos
Hello. I have used this: stateset-setAttributeAndModes(new osg::Program()); and it worked. But why the other way didnt work ? thnx. ___ osg-users mailing list osg-users@lists.openscenegraph.org