revamp RenderManager and reimplement depth sorting