Archive for January, 2010

WebGL around the net, 13 Jan 2010

Today we’ve three bits of news about frameworks that make WebGL programming easier.

Paul Brunt has managed to add shadows to GLGE! Shadows require some fairly complex trickery with frame buffers to work properly, and unfortunately part of that isn’t implemented yet in Firefox (or, it seems, in the other WebGL implementations). However, Paul’s [...]

Cruft dropped

I’ve removed the compatibility cruft from all of the lessons and examples on this site, and updated the WebGL Cookbook’s page about initialising your WebGL context. Here’s to cleaner, simpler code!
The bad news is that I’ve discovered that WebKit doesn’t yet support the flipY flag that I was so happy to find in the [...]

WebGL around the net, 8 Jan 2010

Just two quick links for today:

Eric Shepherd, Developer Documentation Lead at Mozilla, is starting a series of articles on WebGL; just one so far, but it’s looking promising!
Chris Marrin has added a new “User Contributions” section to the Khronos WebGL wiki: a great place for more permanent record of the kind of stuff I’m linking [...]

Time to drop the cruft

The other day I asked people whether their browsers support the latest versions of the WebGL APIs. A lot of the WebGL code out there — including the lessons I’ve been putting together here — uses a lot of nasty code at the start so that it can support differences between older versions of [...]

A quick retrospective change to the lessons: image flipping

In the comments to lesson 5, where we introduce textures, rotoglup pointed out that adding an operation per-fragment to flip the texture vertically (which is required because its coordinates increase as you move down the GIF image, while we want maths-like coordinates that increase as you go upwards) is a bit of an overhead for [...]

WebGL around the net, 7 Jan 2010

A good mix of stuff today!

Aaron Babcock has written a version of a classic Flash game to run on the graphics card using WebGL. It’s called Falling Sand; click on one of the palette of materials at the bottom of the page and then drag on the canvas to paint it, add a few [...]

WebGL around the net, 5 Jan 2010

Just one new link for today: QBox, by Sandro Paganotti. It’s a photo slideshow app, which displays a number of photos on the sides of a slowly-rotating cube.

WebGL Lesson 12 – point lighting

<< Lesson 11Lesson 13 >>
Welcome to my number twelve in my series of WebGL tutorials, the second one that isn’t based on the NeHe OpenGL tutorials. In it, we’ll go through point lighting, which is pretty simple, but is important and will lead on to interesting things later. Point lighting, as you might [...]

Is it time to remove the compatibility cruft?

[UPDATE 23 August 2010: one of the API changes this post is talking about, from CanvasFloatArray to WebGLFloatArray, was itself superseded by a change to Float32Array later on. The test page here is no longer relevant -- it will fail saying that it can't find the canvas array types]
[This is a cross-post from the [...]

Retrospective changes to the lessons: 1TBS

Once again, I’ve been through the previous posts and made a number of changes. Most of them are cosmetic in nature, but one looks cosmetic but isn’t.
A good way to start a violent argument between developers is to start talking about indentation styles. When you have an “if” statement or a function definition, [...]

Subscribe to RSS Feed Follow Learning WebGL on Twitter