I like to put my shaders into separate files and load them via XHR, so I added a Shader factory method for that. It's currently limited to synchronous XHR, which is of course not good performance-wise if you have lots of shaders, but it's a start.
Also added the ability to pass a pre-existing canvas to GL.create(), which I've found convenient.
I like to put my shaders into separate files and load them via XHR, so I added a Shader factory method for that. It's currently limited to synchronous XHR, which is of course not good performance-wise if you have lots of shaders, but it's a start.
Also added the ability to pass a pre-existing canvas to GL.create(), which I've found convenient.