[Public WebGL] questions about vertexAttribPointer / getVertexAttrib offsets

Kenneth Russell [email protected]
Fri Apr 27 15:34:01 PDT 2012


A few points:

The reason vertexAttribOffset accepts a signed value at all is that
when converting the signature from C to JavaScript, the desire was to
use a preexisting typedef from gl2.h which was closest to the desired
semantics. GLintptr_t (which is signed) was chosen, and extended to 64
bits via the choice of IDL type "long long".

There is however no use case for negative offsets. The spec for
vertexAttribPointer has been updated to indicate that it generates an
INVALID_VALUE error if the offset is negative.

The constant VERTEX_ATTRIB_ARRAY_POINTER is used; it has to be passed
to getVertexAttribOffset, mirroring the behavior of
glGetVertexAttribPointerv (it's currently the only enum accepted).

-Ken


On Mon, Apr 23, 2012 at 6:12 PM, Boris Zbarsky <[email protected]> wrote:
>
> On 4/23/12 7:32 PM, Gregg Tavares (勤) wrote:
>>
>> Update this test to use -4. I think that makes it check for negative
>> offsets instead of the offset not being the correct size of the type.
>
>
> Yes.
>
> Now Chrome passes this test, while my Firefox build with the check for
> negative offset removed fails.
>
> Chrome still doesn't generate an error when the offset is -8000000000,
> though.
>
>
> -Boris
>
> -----------------------------------------------------------
> You are currently subscribed to [email protected]
> To unsubscribe, send an email to [email protected] with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>

-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------





More information about the public_webgl mailing list