I’ve spent a while playing with WebGL on the Nokia N900 smartphone. It sounds like its inclusion in the 1.2 release of the phone’s firmware (which happened last week) was a surprise to the Mozilla team, which would explain why we’ve not seem any publicity… So, given that the developers don’t think it’s ready for prime time yet, and that the WebGL standard isn’t at 1.0 yet, and no-one’s been testing their demos on anything apart from desktop machines, it’s surprising that it works at all, and astonishing that it works as well as it does :-)
If you have an N900, here’s a random selection of demos that will work on it; I’ll put a video together for people who don’t but still want to see it… [UPDATE: video here]
- A spinning WebGL cube. (This includes a workaround for an odd bit of shader behaviour — interested parties might want to compare with this version without the workaround.)
- Vladimir Vukićević’s Spore creature viewer (took a long time to appear — perhaps 2 minutes — but worked fine when it did).
- Brandon Jones enhanced Spore viewer (took a while to come up
, and for some reason it won’t respond to mouse drags[UPDATE with a link directly to the demo, mouse drags now work]) - Particle explosions
- Google’s shiny teapot demo
- Google’s San Angeles demo
- Google’s particle demo
- My first Mandelbrot demo
- Lesson 9: Merry Christmas
- Lesson 10.5: nano-doom with lighting
- Lesson 14: per-pixel teapot with specular highlights
- Lesson 16: render-to-texture
- Pl4n3’s single-file skeletal animation
- Ilmari Heikkinen’s whale (a few glitches when drawing this one).
- Pavlos Toukiloglou’s Copperlicht-based Match 3D game.
- Evgeny Demidov’s interference patterns.
- CopperLicht’s Quake demo (loads, but a bit hard to control because keypresses go to the URL bar…)
- Four dollar Plastic Laminator (albeit at 1fps…)
- [UPDATE from the comments below, here's Glubble from PlayWebGL.]
(That list is entirely based on what I happened to click on over the course of this evening. If you’ve got a WebGL demo that you’d like me to try out, leave a comment below with a direct link to the WebGL page and I’ll let you know if it works, and put it in the list if it does.)


Hi,
to get keypresses to canvas instead of url bar, disable “auto focus address field” in the browsers “option” menu (don’t remember exact menu in english, have different locale here).
Hey thats great news. I would like to know if the EnergizeGL Examples are running :)
Any comments on how fast the demos run? What’s it like on a mobile phone? How well does the hardware accelerate things? Is the Javascript slowness a particularly bad problem?
@suihkulokki — thanks! That works. On the English menus, it’s Options/Settings/Auto focus address field.
@Denny — the first four look almost OK — “almost” because it looks like you’re getting the problem I was seeing with my simple WebGL cube; my lessons 4-6 have the same problem, and I suspect it’s a platform error rather than a mistake on our part. I’ll be doing a video later that will show the problem. Your images demo just displays a black box, the RTT one renders a white box in a dark box, model files displays the shape but with the same distortion as the first four, shaders/ambient light is fine, direct light is fine, displacement mapping one, unfortunately just displayed a white box.
@steve — Simple stuff, up to and including my lesson 14, works fine modulo the distortion that I’m seeing with simple shaders. Stuff that loads up high-poly models, like the Spore viewer or Copperlicht’s Quake map, is very slow to start up. I don’t know if that’s parsing overhead or bandwidth to the GPU. Once it’s loaded up, frame rates are poor but not disastrous — 1fps on something as GPU-heavy as $4 plastic laminator isn’t too bad. My video camera has been “tidied away” somewhere, so when I’ve found it again I’ll make a movie of a few of the sites above and post it.
This is awesome, been playing around with it today. The next part of the puzzle is..
https://developer.mozilla.org/en/DOM/window.onmozorientation
Seems like MicroB also supports the MozOrientation event, which means it will give you some info about what the Accelerometer is doing. +/- 1 depending on the angle of the phone =D
Thanks for the detailed testing Giles! I’m looking forward to the videos.
Very cool! I wonder why mouse dragging doesn’t work on my demo. :(
You may also want to try going to it directly instead of viewing it via the blog, just to see if that improves performance:
http://www.tojiart.com/WebGL/spore.html
Have you tried Glubble and Game of Life demos I’ve put on my website ? I’m curious to know what is supported on a phone. I know Glubble won’t be playable because of the mouse system I used but if it starts it’ll be great :)
However, you’ve done a great job.
[...] show off on N900 Wed, 09/06/2010 – 12:52 Giles Thomas from learningwebgl.com collected a few WebGL demos, which are actually working on N900. Since PR 1.2 the N900 is [...]
[...] If you want to run out and try out WebGL content on your N900, Giles Thomas from learningwebgl.com has some links which have content which works on the N900. You can access his blog post regarding by clicking here. [...]
@DaveR53 — that sounds fantastic! IIRC MicroB already handled the GPS location stuff, so with that, orientation, and 3D, there should be some interesting semi-AR application possible; now if only they’d add camera support from web pages, we’d be able to implement Layar as a web page :-)
@Denny — no problem
@Toji — that fixed it! I’ll update the post with the new URL.
@Alan — the game of life just flashes, which is odd. Glubble looks like it would work apart from the mouse system, though!
@giles Thanks. I’ve change the way to select the bubbles (you can click and move without releasing the mouse to select). Can you tell me if it is working now and if yes, what do you think of it (easy to play? too small on the screen ?) Thank you
[...] Thomas de learningwebgl.com ha recopilado una pequeña colección de demos de WebGL que funcionan en el Nokia N900 desde la [...]
@Alan — looks good now, I was able to play it. I’ve added it to the list.
[...] was the first to discover the mobile webgl support on the N900. Yvonne was brave enough to patch her phone with the latest [...]