2) I want a copy of the data in the buffer. How do I do this? Are there now
2 constructors for views? One to make a copy and one to make view?
Does it work as is or does it need more?

The simplest way would be to call "buffer.slice(0)".

The slice function is implemented for ArrayBuffers in Chrome 17 and Safari nightly but not in FF 11.

In the spec it's listed in straw-man status.

I'd like to be able to copy typed arrays as quickly as possible. Is ArrayBuffer.slice() likely to become part of the specification?

+bjacob

I think it's likely to remain. There was some discussion about whether
it is implementable in pure JavaScript (it is) and therefore whether
it should be added to the API. The consensus seems to be that despite
the fact that it is implementable in pure JS, it is a small addition
to the existing API which is more efficient than doing the same
operation in JavaScript -- it avoids allocating two garbage
Uint8Arrays.

The API was added recently which is why it isn't widely implemented.
I'm not aware of any objections.

I'm not working on Typed Arrays myself; CC'ing some Mozilla folks who are.

Benoit

-----------------------------------------------------------
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:
unsubscribe public_webgl
-----------------------------------------------------------