[Public WebGL] Should the non-typed-array overloads of uniform*v and vertextAttrib*v be IDL arrays or IDL sequences?

Kenneth Russell [email protected]
Thu Apr 26 17:26:22 PDT 2012


On Sun, Apr 15, 2012 at 11:29 AM, Boris Zbarsky <[email protected]> wrote:
>
> Can the objects passed in to these functions ever be gotten back from the
> WebGLContext?  All the functions returning "any" seem to say that a new
> object is returned on each call for the cases when returning arrays.  Are
> there other cases that return an IDL array object?
>
> Alternately, are mutations to the array object that's passed in supposed to
> affect behavior after the call?
>
> If neither of the above is true, then making these sequences seems like it
> would make more sense.

Early drafts of the WebGL spec used sequences for these arguments.
When arrays were added to Web IDL, they were changed to arrays, to
potentially support more efficient calls from JavaScript to C++.
However, these entry points never mutate the incoming array.

If they were changed to sequence<T>, then could a browser still pass
them throughout its DOM bindings by reference, as long as it promises
to not mutate the object? If so, that could work.

-Ken

-----------------------------------------------------------
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