Changed renderer pipeline

Render functions now generate render commands that are stored in a list
and all executed at the end of the frame. This is done to support
out-of-sequence screen updates that can be used by modal GUIs.