order = order ? order : dojox.gfx3d.scheduler.order; buffer.sort(function(a, b){ return order(b) - order(a); }); return buffer;