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

Re: [Public WebGL] Problem with typed arrays in firefox




However, one reason that this came up that I was is in trying to access
int32 data in an heterogeneous array. If we stick to the spec as it stands
then it means that it becomes a requirement that the array buffer is padded
to either modulo 2, 4,  or 8 if *any* of the data in the buffer is 2, 4, or
8 bytes in size and you access that data using an ArrayBufferView.
This is not the case. It's only true if you're using the constructor
that takes a byte offset but no length. It's a requirement that typed
array views start at a byte offset that is a multiple of their element
size (i.e., aligned accesses only) so you may need to pad at the
beginning of a region of a particular type, but not necessarily at the
end.

-Ken
Hmm. Good point. I was using that form of constructor because it saved having to remember where I'd got to whilst 'walking' through the buffer.

Thanks

Alan

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