[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGL Extensions

On May 31, 2010, at 2:16 PM, Ilmari Heikkinen wrote:

> 2010/5/31 Andor Salga <asalga@learn.senecac.on.ca>:
>> Ok, thanks.
>> Can you guys point me to some resources for writing WebGL extensions? How
>> would someone go about writing one? I need to start working on it since I
>> have a project which will require GL_ARB_occlusion_query. Having the
>> extension done by the time WebGL extensions are supported would be really
>> great.
>> Thanks,
>>   Andor
> As far as I know there is no consensus on how the extension mechanism
> would work. So you're pretty much pioneering on here. I'd start by
> writing a JavaScript object that wraps all your extension-requiring
> WebGL calls. Then brush up your C++ and go hack the WebGL
> implementation in some browser to add a new native object type for
> your extension (which would implement only the stuff the extension
> does and call the underlying webgl context) ... tell you what, this is
> getting complex.

The extension mechanism has been fleshed out. It has 2 functions: getSupportedExtensions() and getExtension(). The first gives an array of extensions supported by this browser and the second returns an object which provides an interface to the given extension. getExtension() will only ever return a valid object for an extension that is in the getSupportedExtensions() list. This feature is similar to, but not the same as the extension mechanism of OpenGL ES 2.0. It will be the path by which we expose OpenGL ES 2.0 extensions. But the only extensions officially supported will be those added to the spec. The 1.0 version of the spec won't officially support any extensions, and when we do we will only support either WebGL specific extensions (which would typically be implemented in software under the hood) or OpenGL ES 2.0 extensions. So we will never support GL_ARB_occlusion_query officially, unless an equivalent ES version is created.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: