From Colin McDonald, "I've included render bin checks in the StateSet::compare function, because

without them the Optimizer can incorrectly eliminate (otherwise identical)
StateSets from different render bins."
This commit is contained in:
Robert Osfield
2006-10-02 15:59:43 +00:00
parent e0599f652e
commit 842b96bbc9

View File

@@ -353,6 +353,20 @@ int StateSet::compare(const StateSet& rhs,bool compareAttributeContents) const
}
else if (rhs_uniform_itr == rhs._uniformList.end()) return 1;
// check render bin details
if ( _binMode < rhs._binMode ) return -1;
else if ( _binMode > rhs._binMode ) return 1;
if ( _binMode != INHERIT_RENDERBIN_DETAILS )
{
if ( _binNum < rhs._binNum ) return -1;
else if ( _binNum > rhs._binNum ) return 1;
if ( _binName < rhs._binName ) return -1;
else if ( _binName > rhs._binName ) return 1;
}
return 0;
}