Wednesday, November 11, 2009

WebGL updates

I have several links to share.

Yohei Shimomae updated his Cube Defense game demo to work on Firefox. I think this is the first fully-playable WebGL game I've seen. This is pretty encouraging to see without any documentation and I hope to see many more of these. There are some confusing comments about the WebGL arrays on his blog, though. WebGL introduces types for handling native arrays from JavaScript. Vlad wrote up some info about the rationale for them and explains how they're used.

Cube Defense

A couple of libraries have appeared to simplify writing applications that use WebGL: C3DL and WebGLU. C3DL has been around for almost 2 years now and has recently been ported to WebGL. A demo of the port is here.

C3DL Orbiter

Since there isn't any real documentation on WebGL so far, getting even this far takes some digging and patience. Giles Thomas created a blog about WebGL with very detailed lessons based on the NeHe OpenGL lessons. Giles updates pretty regularly with new lessons (7 so far!) and demos. He also fairly impressively stays on top of other new demos and WebGL things so his blog is good to watch if you're interested in WebGL. The previous warning still applies: WebGL is still changing. Until the spec is finalized, lessons and demos are likely to break. Expect some updates on this in a few weeks.

While Giles does a pretty great job of collecting links, Chris Blizzard set up a planet site for WebGL which includes his and other blogs of people posting about WebGL. If you know of someone else or are someone with a blog about WebGL, let Chris know and get it added to the site.

Tuesday, September 22, 2009

WebGL demos

Yesterday, Vlad wrote about his awesome Spore model viewer.
This morning, I found out about 2 more new demos: Puls and a demo of the Escher-Droste effect.
About the Puls demo:
This is a port of Řrřola's amazing 256-byte intro Puls to WebGL. The effect is implemented as a single GLSL fragment shader, and thus runs pretty much entirely on the GPU. It was written while trying to learn more about WebGL, and also to gain better understanding of Řrřola amazing little piece of code.
I'm pretty excited about this. My first computer was an Amiga 1000 where demos were king, and I always smile when I see what people manage to cram in to the imposed limits. People are still making demos, but to try them out you have to be able to run them on your platform (if they're available to download). It's just less satisfying to watch a recorded capture on YouTube. This, on the other hand, already works in two browsers.
I'm really looking forward to seeing the first demo competition in WebGL, complete with some <audio>-tag background music.
Go grab a Firefox nightly and try it out now!

Tuesday, August 25, 2009

Keeping up with the Khronos

For anyone following the attempts to bring 3D graphics to the web, the announcement by the Khronos Group of the WebGL working group was very exciting. The Khronos Group is the body that inherited the OpenGL standard from the OpenGL ARB. OpenGL has been around for 17 years. It is older than the Web. Not only has it been around, it's current. Everyone knows that if you want to do cross-platform hardware-accelerated 3D graphics on your desktop, you use OpenGL. If you ask the same for the web, there hasn't been a good answer. WebGL will hopefully fix that, taking advantage of the ubiquity and popularity of OpenGL in a way that fits the web.

And it's coming soon. The WebGL working group is targeting the first half of 2010 for release of the standard, but implementations will show up before that. The canvas3d prototype has been around for 2 years and gives a peek at what to expect, though it's different in the details.

The WebGL spec is not final yet, but Vlad's work is a head-and-torso-start. He's been updating it to match the spec, but recently I've taken this over to keep things moving with the spec. I'll also be looking at performance. Manipulating large amounts of native data, as needed for OpenGL, can be made much faster in JS.

I'll be posting updates about my progress soon.