This project is under heavy development. Currently, it won't work -- period. I'm still working on framebuffer, renderbuffer and texture support; without these, nothing can be rendered at all. Just so you know: it's not usable yet. On the other hand, if you're here to help, welcome aboard! Please feel free to fork the project, commit some code and send me a pull request.
The library is intended to be entirely standards compliant, and therefore compatible with any WebGL framework or usage. It attempts to implement the WebGL specification (http://www.khronos.org/registry/webgl/specs/latest) and produce results as closely as possible to a native WebGL context.
Usage is simple. Replace the normal WebGL context creation:
var canvas = document.getElementById('my-canvas'); var context = canvas.getContext("experimental-webgl");
var canvas = document.getElementById('my-canvas'); var context = canvas.getWebGLCompatibleContext();
The library will check for WebGL availability and, if present, use it; if the browser doesn't support WebGL, the library will wrap a 2D context, and the object returned can be used identically to any other WebGL context.
Alternatively, you can bypass "true" WebGL and use this library exclusively like so:
var canvas = document.getElementById('my-canvas'); var context = new WebGLCompatibilityLayer(canvas);
Though, outside of testing purposes, I don't know why you'd want to do this.
This library is being developed exclusively for compatibility with Internet Explorer; it should work on other browsers, but performance could be impacted considerably. For instance, the proof of concept mentioned in the above paragraph, which maintained a steady 42 frames per second on IE, averaged only 13-15 frames per second on Chrome. On the other hand, Chrome supports WebGL natively, so I consider this a non-issue.