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

Re: [Public WebGL] Clarification to bufferData




----- Original Message -----
> I've committed a small clarification to the bufferData variants taking
> ArrayBuffer and ArrayBufferView indicating that they generate an
> INVALID_VALUE error if null is passed for the buffer or view. This
> behavior is strongly desired because it is ill defined what happens
> otherwise. (Does the call become a no-op? Is the buffer object resized
> to zero size?)

FWIW, for us currently we try to convert the arg to a non-null ArrayBuffer or ArrayBufferView, and if that fails then we do the JS standard "ToInt32()" operation to get a size.  For null that'll give us back 0, so we end up treating it as resizing the buffer to 0-size.  Not sure if that's any better or worse; I have no problem with the change.

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