Browse Source

fix LP bug 1133771, RenderState.compare_to does not work with state-cache or uniquify-attribs disabled

rdb 12 years ago
parent
commit
126573775a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      panda/src/pgraph/renderState.I

+ 3 - 2
panda/src/pgraph/renderState.I

@@ -550,8 +550,9 @@ operator = (const Attribute &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE int RenderState::Attribute::
 INLINE int RenderState::Attribute::
 compare_to(const Attribute &other) const {
 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;
   return _override - other._override;
 }
 }