Description
TL;DR
- We're moving
wgpu.gui
into a new library calledrendercanvas
: https://github.com/pygfx/rendercanvas - The
wgpu.gui
will remain working for a while, to ease transition.- This means updates to wgpu can be applied, and new releases be made, without interfering with this transition.
- We'll create documentation on how to update to rendercanvas.
- When we get to the "update propagation" work in Pygfx, Pygfx will switch to
rendercanvas
. - The
wgpu.gui
will be deprecated sometime after the "update propagation" changes in pygfx are all done. Nu rush.
In earlier work the API for the canvas was separated better from wgpu itself. The idea was that in principal it should be considered a separate package. I now think we should really make it a separate package.
In short, the reason is that the canvas logic and API are about orthogonal to wgpu. It also solves a completely different problem. Things like tests and docs are also very different. Also, wgpu can be used without a canvas, and a canvas can potentially also be used without wgpu (it already supports displaying bitmap images).
With the rework that's on the way in #618 (and follow-up prs), I think now would be a really good time. We can apply all the new stuff (which will change the API a bit) to the new library, while we keep wgpu.gui
as-is until we gradually deprecate it.
The purpose of the new lib would be the same as our current wgpu.gui
, but let's make it explicit:
- Providing a generic canvas API to render to (with wgpu).
- Providing canvas implementations for various GUI libraries (e.g. qt and wx) and platform (e.g. Jupyter, browser).
- Providing an event system with standardized event objects.
- Providing an event loop and scheduling.