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 that’s entirely correct. The TEXTURE_2D constant was misplaced in the spec, which might have been the cause of the confusion. So I’ve removed that from all the lessons, and you can get rid of it from your code too :-)

From the good news to the neutral news: a number of people who were running Safari on Macs found that they couldn’t see the texture, or indeed the lighting, for lessons 11 and 12. I’ve finally worked out why: Safari doesn’t like PNG textures, or at least the specific PNGs I was using. I need to put together a good test to reproduce this so that I can report it to the WebKit team, but for now I’ve switched to using GIFs for all of my textures, and you may want to think of doing likewise. A problem, but there’s an easy workaround for everyone to use in the meantime.

From the neutral news to the, well, not so great. As I said the other day, WebKit doesn’t seem to support the flipY flag for texImage2D. So I’ve backed out the change that I’d made to use that, and once again the textures are being flipped by code in the fragment shaders.

[UPDATE as of 13 March 2010, the problem with flipY seems to be fixed, so we're using it once more.]

You can leave a response, or trackback from your own site.

Leave a Reply