mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix LP bug 1133771, RenderState.compare_to does not work with state-cache or uniquify-attribs disabled
This commit is contained in:
parent
5b1ea47fee
commit
126573775a
@ -550,8 +550,9 @@ operator = (const Attribute ©) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int RenderState::Attribute::
|
INLINE int RenderState::Attribute::
|
||||||
compare_to(const Attribute &other) const {
|
compare_to(const Attribute &other) const {
|
||||||
if (_attrib != other._attrib) {
|
int c = _attrib->compare_to(*other._attrib);
|
||||||
return _attrib < other._attrib ? -1 : 1;
|
if (c != 0) {
|
||||||
|
return c;
|
||||||
}
|
}
|
||||||
return _override - other._override;
|
return _override - other._override;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user