Updated to use the revised rendering API.