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

Re: [Public WebGL] WebGL bufferSubData lacks "size" parameter



a = new Uint8Array([1,2,3])
b = a.subarray(1, 2)
console.log(a.length, b.length, a[1], b[0])

On Wed, Jan 11, 2012 at 9:47 PM, Chananya Freiman
<spectralcanine@gmail.com> wrote:
> Creating a second view like you showed doesn't work, it copies the whole
> buffer.
> Try the following code:
>
> var buf = new Uint8Array(100);
> var buf2 = new Uint8Array(buf, 20, 40);
> console.log(buf);
> console.log(buf2);
>
> It might work if I use actual ArrayBuffers, but for that I will have to
> change my whole code.

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