Added setStateSet(0) to destructors to force the problem clean up of attached

StateSets.
This commit is contained in:
Robert Osfield
2005-07-30 18:44:18 +00:00
parent 098fafc198
commit e534e4d1ed
2 changed files with 5 additions and 0 deletions

View File

@@ -299,6 +299,9 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
Drawable::~Drawable()
{
// cleanly detatch any associated stateset (include remove parent links)
setStateSet(0);
dirtyDisplayList();
}

View File

@@ -57,6 +57,8 @@ Node::Node(const Node& node,const CopyOp& copyop):
Node::~Node()
{
// cleanly detatch any associated stateset (include remove parent links)
setStateSet(0);
}
void Node::addParent(osg::Group* node)