WebGL | 3D Context for Canvas API

Today, the WebGL WG at Khronos [1] released a public draft of the WebGL 
specification [2], and we really welcome (and need) wide review.  Along 
with Mozilla folks, the WebGL WG has representatives from Opera, Google, 
and Apple, and nightly builds of Firefox, Chromium, and Safari have 
support for the draft specification.  You can read a bit more about it 
in a blog post I wrote here [3].  Essentially, WebGL is an HTML Canvas 
context.  So you'd invoke it for now using:

// obtain canvas handle
var canvas = document.getElementById("canvas");
gl = canvas.getContext("experimental-webgl");
// Now do cool stuff

The specification is still in draft status, so stuff will change, and 
your feedback is welcome :)   We've already seen some compelling use of 
JavaScript libraries that straddle WebGL come out, such as X3DOM [4].  I 
expect to see more of that going forward, since WebGL is a pretty low 
level API that wraps OpenGL ES 2.0, with some concessions made for how 
JavaScript works (since OpenGL ES 2.0 is essentially a C API).  The 
WebGL Wiki [5] has details on how you can test it in the browsers that 
support it.
I expect we'll want to have technical discussions about the Canvas API 
in general following this release, but for now this is an informative 
heads-up.

Season's greetings, etc.,

-- A*
[1] WebGL homepage: http://webgl.org/
[2] Draft Specification: 
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html 

[3] Blog post: http://hacks.mozilla.org/2009/12/webgl-draft-released-today/
[4] X3DOM, an XML interchange for 3D data that uses WebGL: http://x3dom.org
[5] WebGL Wiki: http://khronos.org/webgl/wiki

Received on Thursday, 10 December 2009 23:06:51 UTC