Improvement to y_sort: make clear which item has to be drawn first
when both have the same y coordinate (prevents possible flickering). Reapplying #7241 to the 3.0 code.
This commit is contained in:
parent
3fae505128
commit
8b8807e37d
1 changed files with 4 additions and 1 deletions
|
@ -44,7 +44,10 @@ public:
|
|||
|
||||
_FORCE_INLINE_ bool operator()(const Item* p_left,const Item* p_right) const {
|
||||
|
||||
return p_left->xform.elements[2].y < p_right->xform.elements[2].y;
|
||||
if(Math::abs(p_left->xform.elements[2].y - p_right->xform.elements[2].y) < CMP_EPSILON )
|
||||
return p_left->xform.elements[2].x < p_right->xform.elements[2].x;
|
||||
else
|
||||
return p_left->xform.elements[2].y < p_right->xform.elements[2].y;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue