This project was spun out of wgpu-py, and has evolved to meet our requirements for update-propagation and more. This document lists all the changes w.r.t. the last version of the canvas in wgpu-py.
Let me know if I missed any!
WgpuCanvas
->RenderCanvas
.run
->loop.run()
.call_later
->loop.call_later
.canvas.is_closed()
->canvas.get_closed()
.- The
canvas.get_context()
must be called with an arg:canvas.get_context("wgpu")
.
- Overall cleaner code, more tests, better docs.
- Support for contexts other than wgpu.
- Bitmap rendering via builtin
canvas.get_context("bitmap")
. - Handling of sigint (ctrl+c).
- Support for Trio.
- Support for async event handlers.
- Support for running async functions via
loop.add_task()
. - Simpler Qt lib selection with
from rendercanvas.pyside6 import RenderCanvas
. - Generic scheduling system with modes "ondemand", "continious", "fastest".
In wgpu-py:
from wgpu.gui.auto import WgpuCanvas, run
...
run()
In rendercanvas:
from rendercanvas.auto import RenderCanvas, loop
...
loop.run()