[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

On Thu, Apr 26, 2012 at 7:26 PM, Kenneth Russell <kbr@google.com> 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