Move setting up scene and rendering function to main(). Make window rendering function be set by function pointer.