Hi Art, As I previous explain before the apply of the default setting is done by apply a default constructed StateAttribute, this applies to osg::Program just as it does any other StateAttribute. This default constructed StateAttribute is applied when all other entries of that specific type of attribute are popped off the stack.
Inside osg::State you have the strcuture below, please not the global_default_attribute member - this is the one that holds the clone and does the apply back to default. struct AttributeStack { typedef std::pair<const StateAttribute*,StateAttribute::OverrideValue> AttributePair; typedef std::vector<AttributePair> AttributeVec; AttributeStack() { changed = false; last_applied_attribute = 0L; global_default_attribute = 0L; } /** apply an attribute if required, passing in attribute and appropriate attribute stack */ bool changed; const StateAttribute* last_applied_attribute; ref_ptr<const StateAttribute> global_default_attribute; AttributeVec attributeVec; }; So.. please review osg::State thoroughly. If there is a bug then please highlight it, but.. don't keep asking for something that already exists just not in the form you are expecting it. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org