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

Glenn Maynard [email protected]
Thu Apr 26 19:25:51 PDT 2012

On Thu, Apr 26, 2012 at 7:26 PM, Kenneth Russell <[email protected]> wrote:

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

This seems like a premature optimization; the call overhead of WebGL calls
seems very unlikely to ever be a bottleneck.  (This isn't OpenGL 1.0, with
function calls per vertex.)  ArrayBuffer deals with the cases where
avoiding copies matters, but worrying about making a copy of four floats
just seems like a distraction.

Glenn Maynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120426/d9626050/attachment.html>

More information about the public_webgl mailing list