WebGL extensions

I was going to keep this until the next “around the net” post, but there’s too much to say about it to fit into one of those…

Today, Kenneth Russell announced that WebGL 1.0 will support extensions, and there’s now an official registry for them. (Actually, strictly speaking I think he “clarified” that it would support extensions, and the spec already said it did — though a number of people, including myself, hadn’t understood that.)

Anyway, what this means is that the WebGL spec will define all features that are guaranteed to exist in all WebGL implementations, but if you’re willing to write pages that only work on certain machines, you will be able to ask the WebGL runtime if it supports the extension for, say, floating-point textures (which are very useful for doing shadows) and if it does, you’ll be able to use them — though, of course, you’ll also need to write code to handle the case where they don’t work if you want people with less-able devices to be able to view your site.

This should be interesting; on the one hand, it stops WebGL from becoming a lowest-common-denominator API, so you should be a able to write pages that use at least some of the features of higher-end graphics hardware. This will mean that WebGL pages will compare better to desktop applications. On the other hand, it does run the risk of fragmenting things so that certain WebGL sites just don’t run on certain browsers/devices.

Perhaps the framework libraries can automate the process of failing over from using extensions to doing best-case rendering without them, so that application developers don’t need to?

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

5 Responses to “WebGL extensions”

  1. Alvaro says:

    [OT, not about the extensions]

    I recently discovered that Chrome 9 in its “dev” version has WebGL enabled by default, and that means that Chrome Frame dev also has it.

    This is important news: it means WebGL in IE! (I tried it) just install the “dev” version of Chrome Frame and add the appropriate tag at the top of your pages.

    Also interesting is that Firefox will make ANGLE the default rendering library for WebGL, as Google does. Great news too with respect to “WebGL-enabled” audience. Hardware supporting DirectX 9 should do it (more common than OpenGL 2.1). I tried some demos in my Atom + Intel GMA 950 Netbook and they work (the simplest at least). Well, a limitation in that very low end case is with the number of arithmetic operations supported in pixel shaders (64) which makes only simple shaders work, but it’s better than nothing.

  2. steve says:

    @Alvaro; that’s good info! Technically just another step, but in practice very significant! Chrome Frame and ANGLE have suddenly come together.

  3. giles says:

    Thanks, Alvaro — that’s great news!

  4. Simon says:

    I haven’t been able to make this work. I’ve uninstalled and reinstalled chrome frame dev but still no webGL joy in IE. What am I doing wrong!

    Any help would be much appreciated!

  5. giles says:

    @Simon — something I haven’t made clear (but should) is that you need to put a bit of magic code at the top of your WebGL pages to make IE use Chrome Frame. See here: http://www.chromium.org/developers/how-tos/chrome-frame-getting-started#TOC-Making-Your-Pages-Work-With-Google-

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter