markfarnan / go-canvas

Library to use HTML5 Canvas from Go-WASM, with all drawing within go code
Apache License 2.0
245 stars 20 forks source link

Can this canvas be used for a WebGL context? #5

Open Zireael07 opened 4 years ago

Zireael07 commented 4 years ago

Title.

markfarnan commented 4 years ago

I havn't tried it with WebGL, but that is interesting idea. Will look at it when I get a chance.

markfarnan commented 4 years ago

Short answer: Currently no, it uses 2d image in too many places, but I'm in the process of making changes so that it also supports WebGL, as I get my head around WebGL

The Canvas itself can be used of course, but the animation frame / render loop / img copy will need to change as WebGL dosn't work that way.