Make sure rendering is finalized in drawObstacles.