2014-05-06 12:53 GMT-04:00 Benoit Jacob <jacob.benoi...@gmail.com>:

>
>
>
> 2014-05-06 12:32 GMT-04:00 Boris Zbarsky <bzbar...@mit.edu>:
>
> On 5/6/14, 12:25 PM, Benoit Jacob wrote:
>>
>>> To what extent does what I wrote in my previous email, regarding
>>> interactions between different extensions, answer your question?
>>>
>>
>> I'm not sure it answers it at all.
>>
>>
>>  With the example approach you suggested above, one would have to specify
>>> extensions separately and for each of them, their possible interactions
>>> with other extensions.
>>>
>>
>> Why?  This is the part I don't get.
>>
>> The approach I suggest is that a UA is allowed to expose the new methods
>> on the return value of getContext("webgl"), but only if it exposes all of
>> them.  In other words, it's functionally equivalent to the WebGL2 spec,
>> except the way you get a context continues to be getContext("webgl") (which
>> is the part that Anne was concerned about, afaict).
>
>
> Ah, I see the confusion now. So the first reason why what you're
> suggesting wouldn't work for WebGL is that WebGL extension my add
> functionality without changing any IDL at all.
>
> A good example (that is a WebGL 1 extension and that is part of WebGL 2)
> is float textures.
> http://www.khronos.org/registry/webgl/extensions/OES_texture_float/
>
> WebGL has a method, texImage2D, that allows uploading texture data; and it
> has various enum values, like BYTE and INT and FLOAT, that allow specifying
> the type of data. By default, WebGL does not allow FLOAT to be passed for
> the type parameter of the texImage2D method. The OES_texture_float
> extension make that allowed. So this adds real functionality (enables using
> textures with floating-point RGB components) without changing anything at
> the DOM interface level.
>
> There are more examples. Even when OES_texture_float is supported, FLOAT
> textures don't support linear filtering by default. That is, in turn,
> enabled by the OES_texture_float_linear extension,
> http://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/
>
> Both these WebGL extensions are part of core WebGL 2, so they are relevant
> examples.
>

Well, I guess the "but only if it exposes all of them" part of your
proposal would make this work, because other parts of WebGL2 do add new
methods and constants.

But, suppose that an application relies on WebGL2 features that don't
change IDL (there are many more, besides the two I mentioned). In your
proposal, they would have to either check for unrelated things on the WebGL
interface, which seems clunky, or try to go ahead and try to use the
feature and use WebGL.getError to check for errors if that's unsupported,
which would be slow and error-prone.

Benoit


>
> Benoit
>
>
>
>
>>
>>
>> -Boris
>> _______________________________________________
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to