Removed check against changed flag as check is aleady done outside the method so no need for a duplicate check

This commit is contained in:
Robert Osfield 2016-06-29 16:07:39 +01:00
parent 98b81821fb
commit 0876677fb2

View File

@ -1826,30 +1826,23 @@ void State::frameCompleted()
bool State::DefineMap::updateCurrentDefines()
{
if (changed)
currentDefines.clear();
for(DefineStackMap::const_iterator itr = map.begin();
itr != map.end();
++itr)
{
currentDefines.clear();
for(DefineStackMap::const_iterator itr = map.begin();
itr != map.end();
++itr)
const DefineStack::DefineVec& dv = itr->second.defineVec;
if (!dv.empty())
{
const DefineStack::DefineVec& dv = itr->second.defineVec;
if (!dv.empty())
const StateSet::DefinePair& dp = dv.back();
if (dp.second & osg::StateAttribute::ON)
{
const StateSet::DefinePair& dp = dv.back();
if (dp.second & osg::StateAttribute::ON)
{
currentDefines[itr->first] = dp;
}
currentDefines[itr->first] = dp;
}
}
changed = false;
return true;
}
else
{
return false;
}
changed = false;
return true;
}
std::string State::getDefineString(const osg::ShaderDefines& shaderDefines)