Archive for the ‘Retrospective changes’ Category

More API changes

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. [...]

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 [...]

Some minor retrospective changes

Just so that you know that I’ve not given up on the lessons… I’m slowly but surely putting together the writeup for lesson 16. While working through it (and fixing messy code), I found a couple of things that needed to be changed in all of the previous lessons:

As per Marco Di Benedetto’s suggestion, [...]

Retrospective bugfixes for the lessons

Don’t worry, the lessons will continue shortly! Things have been a little hectic with my day job recently, but I hope to be able to write up lesson 16 over the weekend.
In the meantime, some bugfixes to the older lessons, in particular those after lesson 11:

Chromium expert Ken Russell writes to point out that [...]

A bundle of retrospective changes

I’ve got quite a large list of things I wanted to fix in the lessons, but I’ve just made it three items shorter…

murphy pointed out that modern browsers have built-in JSON libraries, so lesson 14 doesn’t need to import one. So that’s gone.
The code that loaded textures was pretty ugly, creating separate globals for [...]

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 [...]

Retrospective changes: storing attributes and uniforms on the program

For lesson 13, I needed to be able to easily switch the WebGL program object (which manages the shaders) so that you can see the effects of per-vertex or per-pixel lighting just by toggling a checkbox. Obviously, changing which program you’re using means that the code that draws the scene needs to use the [...]

Changing back and forth…

As they say, it’s six of one and half a dozen of the other… I’ve made some more retrospective changes. The good news first:
On the WebGL Wiki, Gman just removed the code saying gl.enable(gl.TEXTURE_2D) from the tutorial, saying that it’s not required, or indeed valid WebGL! I checked on the mailing list, and [...]

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 [...]

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 [...]

Subscribe to RSS Feed Follow me on Twitter!