Close active render passes, submit the command buffer to the GPU, and present.
Must be called once per frame after draw().