Skip to content

Commit 3ecfce8

Browse files
Sorts back to front
1 parent ae4d19b commit 3ecfce8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,10 @@ void Draw(GameResources* res, uint32_t const frameTime[2])
525525
//
526526
}
527527

528+
// Sort back to front
528529
std::sort(sorted.begin(), sorted.end(),
529530
[](std::pair<Entity const*, Eigen::Vector4f> const& x, std::pair<Entity const*, Eigen::Vector4f>& y) {
530-
return x.second(2) < y.second(2);
531+
return x.second(2) > y.second(2);
531532
});
532533

533534
for (auto const& sprite : sorted)

0 commit comments

Comments
 (0)