Updating and Drawing window during game loop