2014-05-06 13:15 GMT-04:00 Ralph Giles <gi...@mozilla.com>: > On 2014-05-06 9:53 AM, Benoit Jacob wrote: > > > 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. > > I have trouble seeing how this could break current implementations. If a > page somehow looks for the error as a feature or version check it should > still get the correct answer. >
I didn't say it would break anything. I just commented on why enabling this feature wasn't just a switch 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/ > > This looks similar. Are there extensions which cause rendering > differences merely by enabling them? > No. WebGL2 does not break any WebGL 1 API. WebGL extensions do not break any API. > > E.g. everything in webgl2 is exposed on a 'webgl' context, and calling > getExtension to enable extensions which are also webgl2 core features is > a no-op? I guess the returned interface description would need new spec > language in webgl2 if there are ever extensions with the same name > written against different versions of the spec. > No, there just won't be different extensions for WebGL2 vs WebGL1 with the same name. > Is this what you mean about considering (and writing tests for) all the interactions? No, I meant something different. Different extensions add different spec language, and sometimes it's nontrivial to work out the details of how these additions to the spec interplay. For example, if you start with an API that allows doing only additions, and only supports integers; if you then specify an extension for floating-point numbers, and another extension for multiplication, then you need to work out the interaction between the two: are you allowing multiplication of floating-point numbers? Do you specify it in the multiplication spec or in the floating-point spec? > > It looks like doing so would violate to webgl1 spec. "An attempt to use > any features of an extension without first calling getExtension to > enable it must generate an appropriate GL error and must not make use of > the feature." https://www.khronos.org/registry/webgl/specs/1.0/#5.14.14 > It would be like getExtension was silently called on context creation. > That is indeed the only difference between a WebGL2 rendering context and a WebGL1 rendering context. (In a theoretical world where all of WebGl2 would be specced as WebGL1 extensions). Benoit _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform