WebGL in Nim
Experimental wrapper to webgl for Nim (JS backend).
Mostly taken from mozilla webgl api
NOTE: it is still incomplete and there are probably bugs
A couple of examples are provided in
They are mostly translations of js code taken from mozilla tutorials and webgl-lessons, so
don't expect idiomatic nim code. I'll work on improving them ( PRs welcome! ).
Some examples and autogenerated docs are avaliable in
/docs and online at
To build the docs and examples,
clone this repo and then run:
The docs are then available in
Compiling to JS
nim js [-o:<outfile.js>] <filename>
Note that the part between
 is optional, but it's useful as otherwise the
.js file built by
would be in
- move consts to enums?
- move function out of the
WebglRenderingContextobject, to have autodocs?
- Some utilites: others?
setting up a context, reading errors, emitting to console
- Have a module for
- Show the code side-by-side with the examples