swiftwasm / WebAPIKit

Access the DOM and other Web APIs from Swift! (Very much a WIP)
MIT License
61 stars 8 forks source link

Add `webgl2` IDL spec and generated code #18

Closed MaxDesiatov closed 2 years ago

MaxDesiatov commented 2 years ago

I've added WebGL 2 example code to DOMKitDemo ported from https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html, which is under MIT/BSD3-like license (added inline to the file), looks like this in action after you press the button. Just a pink triangle, but it finally works!

Screenshot 2022-05-03 at 16 33 44
MaxDesiatov commented 2 years ago

Thanks! I'm thinking of integrating Euclid with WebGL 2 via WebAPIKit. Thankfully, Euclid already compiles and passes all tests almost without issues. It would take time to make something comparable to three.js, but could be a start.