From Tree, fixes for Java bindings

This commit is contained in:
Robert Osfield
2004-10-25 19:16:57 +00:00
parent 66836ef3d0
commit df9c7e5031
6 changed files with 22 additions and 5 deletions

View File

@@ -744,6 +744,21 @@ void StateSet::removeTextureAttribute(unsigned int unit,StateAttribute::Type typ
}
}
void StateSet::removeTextureAttribute(unsigned int unit, StateAttribute* attribute)
{
if (!attribute) return;
if (unit>=_textureAttributeList.size()) return;
AttributeList& attributeList = _textureAttributeList[unit];
AttributeList::iterator itr = attributeList.find(attribute->getTypeMemberPair());
if (itr!=attributeList.end())
{
if (itr->second.first != attribute) return;
setAssociatedTextureModes(unit,itr->second.first.get(),StateAttribute::INHERIT);
attributeList.erase(itr);
}
}
StateAttribute* StateSet::getTextureAttribute(unsigned int unit,StateAttribute::Type type)
{