use separate thread for rendering