moved rendering to another thread