sort cmd queue
This commit is contained in:
parent
6b8083ab5c
commit
bbfc306984
@ -8,6 +8,7 @@ import std::io;
|
|||||||
import std::core::string;
|
import std::core::string;
|
||||||
import std::core::mem::allocator;
|
import std::core::mem::allocator;
|
||||||
import std::collections::pair;
|
import std::collections::pair;
|
||||||
|
import std::sort;
|
||||||
|
|
||||||
|
|
||||||
macro println(...)
|
macro println(...)
|
||||||
@ -313,7 +314,7 @@ $endif
|
|||||||
// sort the command buffer by the z-index
|
// sort the command buffer by the z-index
|
||||||
// FIXME: sorting the buffer fucks with scissor commands that have to be kept in place
|
// FIXME: sorting the buffer fucks with scissor commands that have to be kept in place
|
||||||
// TODO: instead of sorting at the end perform ordered inserts into the command buffer
|
// TODO: instead of sorting at the end perform ordered inserts into the command buffer
|
||||||
//ctx.cmd_queue.sort()!;
|
sort::countingsort(ctx.cmd_queue, fn uint(Cmd c) => c.z_index+1);
|
||||||
|
|
||||||
// foreach (i, c: ctx.cmd_queue) {
|
// foreach (i, c: ctx.cmd_queue) {
|
||||||
// io::printf("[%d]: ", i);
|
// io::printf("[%d]: ", i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user