Kevin Theisen, the creator of the WebGL chemistry tool ChemDoodle 3D, dropped me a line to highlight a change that has just hit WebKit and Chromium — they’ve moved entirely over to the new JavaScript Typed Array specification, so classes like WebGLFloatArray and WebGLUnsignedShortArray have been replaced by the new Float32Array and Uint16Array respectively. [...]
Archive for the ‘API changes’ Category
Retrospective changes to the lessons for the spec update
I’ve updated my tutorials to reflect the WebGL spec changes; they should now run just fine on the most recent versions of WebKit, Chromium, and Minefield, with shader validation switched on. I’ll be updating the lesson text later on this evening.[UPDATE the lessons are all now updated.]
If you’ve still to update your own WebGL [...]
Shader validation and other API changes
There are some API changes coming in WebGL, which will probably require pretty much all of the WebGL content out there to be modified; the changes are likely to go live in Minefield in a week or two, so we need to get moving! Vladimir Vukićević and Benoit Jacob have given the details in [...]
Retrospective changes: viewports
The WebGL spec recently changed to require that you call the gl.viewport before rendering to your canvas; it was previously done for you automatically, but the people working on the spec realised that this could cause problems in certain specific circumstances. The function tells WebGL which part of the rendered image should be shown [...]
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 [...]
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 [...]
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.]
[This is a cross-post from the WebGL forums.]
A lot of current WebGL pages, including the ones on this site, [...]
Context name change with the new draft spec
The new draft spec of WebGL changes the name we use to get the context from the canvas; it used to be moz-webgl for Mozilla or webkit-3d for WebKit. The new standard is experimental-webgl, which the current nightly builds of Firefox seem to use (though they also seem to support the old name), but [...]
The draft WebGL spec is now live!
This is really good news: the draft WebGL spec is now officially available. No more looking at the Mozilla or the WebKit source to try to work out what the available functions are!
As well as the spec, the Khronos guys have put together two brilliant new resources: a WebGL Wiki and a public mailing [...]
API changes
There’s been some discussion on the forum about a recent change to the WebGL API. The full details are below, but the short version is that a number of methods on the GL context were merged together and changed their names; most importantly, gl.getProgrami and gl.getShaderi were merged into new functions called gl.getProgramParameter and [...]

