Update to new upstream API; add debug renderer.