Create polyline draw commands grouped by material.
Finish sorting polyline commands by material.