From ff9ace16b44c45fdf8c83edc3a8ea627f75fc388 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 3 Oct 2005 19:37:54 +0000 Subject: [PATCH] From Keith Steffen, fixed bug in StateSet::clear() where parents of texture attributes where not being reset correctly due to incorrect ordering of _textureAttributeList.clear(). --- src/osg/StateSet.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index b0ed8a9cf..f02bf1fb6 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -438,6 +438,7 @@ void StateSet::clear() setRenderBinToInherit(); + // remove self from as attributes parent for(AttributeList::iterator itr=_attributeList.begin(); itr!=_attributeList.end(); @@ -449,9 +450,6 @@ void StateSet::clear() _modeList.clear(); _attributeList.clear(); - - _textureModeList.clear(); - _textureAttributeList.clear(); // remove self from as texture attributes parent for(unsigned int i=0;i<_textureAttributeList.size();++i) @@ -465,6 +463,9 @@ void StateSet::clear() } } + _textureModeList.clear(); + _textureAttributeList.clear(); + // remove self from uniforms parent for(UniformList::iterator uitr = _uniformList.begin();