painterSortStable method
Implementation
int painterSortStable(RenderItem a, RenderItem b) {
if (a.groupOrder != b.groupOrder) {
return a.groupOrder - b.groupOrder;
} else if (a.renderOrder != b.renderOrder) {
return (a.renderOrder - b.renderOrder) > 0 ? 1 : -1;
} else if (a.program != b.program) {
return a.program.id - b.program.id;
} else if (a.material!.id != b.material!.id) {
return a.material!.id - b.material!.id;
} else if (a.z != b.z) {
return (a.z - b.z) > 0 ? 1 : -1;
} else {
return a.id - b.id;
}
}