|
|
|
@ -1031,6 +1031,11 @@ const StateAttribute* StateSet::getAttribute(StateAttribute::Type type, unsigned
|
|
|
|
|
return getAttribute(_attributeList,type,member);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StateSet::RefAttributePair* StateSet::getAttributePair(StateAttribute::Type type, unsigned int member)
|
|
|
|
|
{
|
|
|
|
|
return getAttributePair(_attributeList,type,member);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StateSet::RefAttributePair* StateSet::getAttributePair(StateAttribute::Type type, unsigned int member) const
|
|
|
|
|
{
|
|
|
|
|
return getAttributePair(_attributeList,type,member);
|
|
|
|
@ -1255,7 +1260,7 @@ StateAttribute::GLModeValue StateSet::getTextureMode(unsigned int unit,StateAttr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StateSet::setTextureAttribute(unsigned int unit,StateAttribute *attribute, const StateAttribute::OverrideValue value)
|
|
|
|
|
void StateSet::setTextureAttribute(unsigned int unit,StateAttribute *attribute, StateAttribute::OverrideValue value)
|
|
|
|
|
{
|
|
|
|
|
if (attribute)
|
|
|
|
|
{
|
|
|
|
@ -1302,7 +1307,7 @@ void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *att
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void StateSet::removeTextureAttribute(unsigned int unit,StateAttribute::Type type)
|
|
|
|
|
void StateSet::removeTextureAttribute(unsigned int unit, StateAttribute::Type type)
|
|
|
|
|
{
|
|
|
|
|
if (unit>=_textureAttributeList.size()) return;
|
|
|
|
|
AttributeList& attributeList = _textureAttributeList[unit];
|
|
|
|
@ -1372,7 +1377,13 @@ const StateAttribute* StateSet::getTextureAttribute(unsigned int unit,StateAttri
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int unit,StateAttribute::Type type) const
|
|
|
|
|
StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int unit, StateAttribute::Type type)
|
|
|
|
|
{
|
|
|
|
|
if (unit>=_textureAttributeList.size()) return 0;
|
|
|
|
|
return getAttributePair(_textureAttributeList[unit],type,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int unit, StateAttribute::Type type) const
|
|
|
|
|
{
|
|
|
|
|
if (unit>=_textureAttributeList.size()) return 0;
|
|
|
|
|
return getAttributePair(_textureAttributeList[unit],type,0);
|
|
|
|
@ -1552,7 +1563,7 @@ void StateSet::setMode(ModeList& modeList,StateAttribute::GLMode mode, StateAttr
|
|
|
|
|
else modeList[mode] = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StateSet::setModeToInherit(ModeList& modeList,StateAttribute::GLMode mode)
|
|
|
|
|
void StateSet::setModeToInherit(ModeList& modeList, StateAttribute::GLMode mode)
|
|
|
|
|
{
|
|
|
|
|
ModeList::iterator itr = modeList.find(mode);
|
|
|
|
|
if (itr!=modeList.end())
|
|
|
|
@ -1561,7 +1572,7 @@ void StateSet::setModeToInherit(ModeList& modeList,StateAttribute::GLMode mode)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList,StateAttribute::GLMode mode) const
|
|
|
|
|
StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList, StateAttribute::GLMode mode) const
|
|
|
|
|
{
|
|
|
|
|
ModeList::const_iterator itr = modeList.find(mode);
|
|
|
|
|
if (itr!=modeList.end())
|
|
|
|
@ -1636,19 +1647,19 @@ void StateSet::removeAssociatedModes(const StateAttribute* attribute)
|
|
|
|
|
attribute->getModeUsage(helper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StateSet::setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, StateAttribute::GLModeValue value)
|
|
|
|
|
void StateSet::setAssociatedTextureModes(unsigned int unit, const StateAttribute* attribute, StateAttribute::GLModeValue value)
|
|
|
|
|
{
|
|
|
|
|
SetAssociateModesHelper helper(this,value,unit);
|
|
|
|
|
attribute->getModeUsage(helper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StateSet::removeAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute)
|
|
|
|
|
void StateSet::removeAssociatedTextureModes(unsigned int unit, const StateAttribute* attribute)
|
|
|
|
|
{
|
|
|
|
|
RemoveAssociateModesHelper helper(this,unit);
|
|
|
|
|
attribute->getModeUsage(helper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StateSet::setAttribute(AttributeList& attributeList,StateAttribute *attribute, const StateAttribute::OverrideValue value)
|
|
|
|
|
void StateSet::setAttribute(AttributeList& attributeList,StateAttribute *attribute, StateAttribute::OverrideValue value)
|
|
|
|
|
{
|
|
|
|
|
if (attribute)
|
|
|
|
|
{
|
|
|
|
@ -1707,7 +1718,7 @@ void StateSet::setAttribute(AttributeList& attributeList,StateAttribute *attribu
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StateAttribute* StateSet::getAttribute(AttributeList& attributeList,StateAttribute::Type type, unsigned int member)
|
|
|
|
|
StateAttribute* StateSet::getAttribute(AttributeList& attributeList, StateAttribute::Type type, unsigned int member)
|
|
|
|
|
{
|
|
|
|
|
AttributeList::iterator itr = attributeList.find(StateAttribute::TypeMemberPair(type,member));
|
|
|
|
|
if (itr!=attributeList.end())
|
|
|
|
@ -1718,7 +1729,7 @@ StateAttribute* StateSet::getAttribute(AttributeList& attributeList,StateAttribu
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList,StateAttribute::Type type, unsigned int member) const
|
|
|
|
|
const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList, StateAttribute::Type type, unsigned int member) const
|
|
|
|
|
{
|
|
|
|
|
AttributeList::const_iterator itr = attributeList.find(StateAttribute::TypeMemberPair(type,member));
|
|
|
|
|
if (itr!=attributeList.end())
|
|
|
|
@ -1729,7 +1740,18 @@ const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList,
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StateSet::RefAttributePair* StateSet::getAttributePair(const AttributeList& attributeList,StateAttribute::Type type, unsigned int member) const
|
|
|
|
|
StateSet::RefAttributePair* StateSet::getAttributePair(AttributeList& attributeList, StateAttribute::Type type, unsigned int member)
|
|
|
|
|
{
|
|
|
|
|
AttributeList::iterator itr = attributeList.find(StateAttribute::TypeMemberPair(type,member));
|
|
|
|
|
if (itr!=attributeList.end())
|
|
|
|
|
{
|
|
|
|
|
return &(itr->second);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StateSet::RefAttributePair* StateSet::getAttributePair(const AttributeList& attributeList, StateAttribute::Type type, unsigned int member) const
|
|
|
|
|
{
|
|
|
|
|
AttributeList::const_iterator itr = attributeList.find(StateAttribute::TypeMemberPair(type,member));
|
|
|
|
|
if (itr!=attributeList.end())
|
|
|
|
|