[Public WebGL] Re: WebGL IDL for uniform1fv is not valid WebIDL

Boris Zbarsky [email protected]
Tue Apr 3 07:12:07 PDT 2012


On 4/2/12 8:42 PM, Glenn Maynard wrote:
> On Mon, Apr 2, 2012 at 7:26 PM, Boris Zbarsky <[email protected]
> <mailto:[email protected]>> wrote:
>
>         I think removing the Float32Array overload will make passing JS
>         Arrays
>         of Numbers and Float32Array objects work.
>
>
>     But require copies in the process, no?  That seems highly
>     undesirable in this case.
>
>
> If it matters as an optimization, implementations could still create
> separate overloads for this as long as it's transparent to the user,
> right?

There are tons of edge cases here, and more being added by the JS folks 
all the time, so doing anything other than exactly what the spec says is 
a good way of introducing bugs...

As an example, if the spec says to get the elements from the input thing 
one by one in order to construct the IDL array, then grabbing a float* 
from an input typed array would have observably different behavior in 
situations where the page has defined a property getter for an indexed 
property on the typed array object in question.  Unless the WebIDL 
indexed access takes priority over user-defined properties, which I 
think it might for the moment.  I'd really rather not have the 
performance characteristics of the platform depending on such fragile 
interactions if we can avoid it.  :(

-Boris

-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------





More information about the public_webgl mailing list