Vladimir Vukićević — Words
 



Since my post on Friday, we landed a few fixes to improve our WebGL implementation and to fix a couple of bugs we discovered on Friday.  I'm looking forward to seeing what people do with WebGL, and how it can be useful on the web right now.  For example, EA/Maxis recently added COLLADA export of Creature designs to their popular game Spore, and they have a Sporepedia where players can see others' creations.  Right now, those previews are just as images.  With WebGL, they could be fully 3D, even animated.

Spore Creature View (thumbnail)Over the weekend I've put together this example, which uses WebGL to render an exported Spore creature, and let the user rotate the 3D model to view it from different angles.  For those who want to try it out, you'll need a recent Firefox nightly (one from today, September 21, or newer), and with one preference flipped as described in this post.

I'll be working to update the very basic "getting started" demos from the GL ES 2 book that I ported to Canvas 3D as well, so that those who are interested in experimenting can have some good basic code to look at.  They're not updated yet, but they should be in the next day or two.

For those of you on Windows who don't have an up to date OpenGL driver, or don't have the possibility of getting one (e.g. many common Intel graphics cards doesn't have OpenGL drivers), you can enable software rendering by downloading a Windows build of the Mesa software OpenGL implementation.  It won't be fast, but it should be enough for you to get an idea of what's going on, and to play with some of the demos.  To use it, download webgl-mesa-751.zip and extract it somewhere on your computer.  It has a single file, OSMESA32.DLL, that you need to tell Firefox where to find:  open up about:config, and set the preference webgl.osmesalib to the path of OSMESA32.DLL.  If you extracted it to "C:\temp", you would put in "C:\temp\osmesa32.dll" in the pref.  Then, flip webgl.software_rendering to true, and you should be good to go.

(Mac OS X users shouldn't need to bother with software rendering, since Apple already provides a high quality OpenGL implementation, and Linux users should be ok as long as they have recent OpenGL drivers installed.)


5 Comments to “WebGL Samples/Demos and other bits”  

  1. 1 Stebs

    Typical Netbooks with Intel i945GME GPU have Windows Drivers with OpenGL 1.4, no vertex shader in hardware though.
    With one of these (and OSMESA32.DLL), the “Spoore” Example works. :)

    No need to set webgl.software_rendering to true (in my case), works in both modes (no real performance difference either).
    Does OSMESA32.DLL only provide “missing” OpenGL capabilities?
    -No big performance difference would mean really bad OpenGL driver then…

    By the way, Webkit examples do not work -but we have been warned ;)

  2. 2 FlashBookmarks

    Awesome, let’s animate it, summons Tim :)

  1. 1 WebGL in Firefox Nightly Builds at Vladimir Vukićević
  2. 2 Laurent Jouanneau (laurentj) 's status on Monday, 21-Sep-09 22:02:07 UTC - Identi.ca
  3. 3 Restrospectively changing my retrospective changes… - Learning WebGL


Leave a Reply