Recently I got stumbled with the node-wpe-webgl repo, that implements a webgl compatible rendering context for Node.js. It's mostly a translation of the webgl APIs to the ones of EGL, but code is very simple and mostly copy-and-paste. I was thinking it would be possible to use it to provide support for the webgl rendering context in node-canvas, both directly by delegaing to it, or picking the code and integrating it directly into node-canvas code. First option would be very simple and straigforward, but has the problem that only would work with screen-based backends (in memory rendering would be possible by using an off-screen rendering surface, but would need a bit more work), while the second one would allow to have it integrated for all backends and also use the same rendering surface (at the cost of having Mesa as another dependency).
Feature
Recently I got stumbled with the node-wpe-webgl repo, that implements a
webgl
compatible rendering context for Node.js. It's mostly a translation of thewebgl
APIs to the ones of EGL, but code is very simple and mostly copy-and-paste. I was thinking it would be possible to use it to provide support for thewebgl
rendering context innode-canvas
, both directly by delegaing to it, or picking the code and integrating it directly intonode-canvas
code. First option would be very simple and straigforward, but has the problem that only would work with screen-based backends (in memory rendering would be possible by using an off-screen rendering surface, but would need a bit more work), while the second one would allow to have it integrated for all backends and also use the same rendering surface (at the cost of having Mesa as another dependency).