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

Re: [Public WebGL] Float32Array constructor on 0 length

On Mon, Dec 20, 2010 at 10:22 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
> Hi,
> The typed arrays spec doesn't AFAICS specify if 0 length is allowed?
> Should this code:
>  var a = new Float32Array(0);
> succeed without any warning? It currently generates an 'invalid argument' warning in Firefox.

It should succeed. Normal JS Arrays can be zero length, so typed
arrays should be able to be. Also, there are plans to use zero-length
arrays and ArrayBuffers to support sending large amounts of data
between the main thread and worker threads.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: