From 126573775aec2ff893a8e4791516c27ee78a54ac Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 19 Nov 2013 21:34:55 +0000 Subject: [PATCH] fix LP bug 1133771, RenderState.compare_to does not work with state-cache or uniquify-attribs disabled --- panda/src/pgraph/renderState.I | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/src/pgraph/renderState.I b/panda/src/pgraph/renderState.I index c75d537658..c2bcace3cb 100644 --- a/panda/src/pgraph/renderState.I +++ b/panda/src/pgraph/renderState.I @@ -550,8 +550,9 @@ operator = (const Attribute ©) { //////////////////////////////////////////////////////////////////// INLINE int RenderState::Attribute:: compare_to(const Attribute &other) const { - if (_attrib != other._attrib) { - return _attrib < other._attrib ? -1 : 1; + int c = _attrib->compare_to(*other._attrib); + if (c != 0) { + return c; } return _override - other._override; }