Thursday, December 10th, 2009

Holiday reading? WebGL Draft Available

Category: Standards

<p>The first WebGL specification is here for your holiday leisure reading. The awesome Arun of Mozilla just posted this to the W3C device API group:

Today, the WebGL WG at Khronos released a public draft of the WebGL specification, 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. Essentially, WebGL is an HTML Canvas context. So you’d invoke it for now using:

javascript
< view plain text >
  1. // obtain canvas handle
  2. var canvas = document.getElementById("canvas");
  3. gl = canvas.getContext("experimental-webgl");
  4. // 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.

More info

What do you think of WebGL? This is a good time to get involved as the Kronos group isn’t as open as some would like.

Related Content:

Posted by Dion Almaer at 6:16 pm
1 Comment

++++-
4.4 rating from 37 votes

1 Comment »

Comments feed TrackBack URI

Thanks you for sharing this

Comment by Tribulus — January 15, 2010

Leave a comment

You must be logged in to post a comment.