[Public WebGL] questions about vertexAttribPointer / getVertexAttrib offsets

Gregg Tavares (勤) [email protected]
Mon Apr 23 12:59:48 PDT 2012


On Mon, Apr 23, 2012 at 12:56 PM, Benoit Jacob <[email protected]> wrote:

>
>
> ------------------------------
>
>
>
> On Mon, Apr 23, 2012 at 12:06 PM, Boris Zbarsky <[email protected]> wrote:
>
>> On 4/23/12 2:43 PM, Gregg Tavares (勤) wrote:
>>
>>> There's at least one negative offset test in
>>> https://cvs.khronos.org/svn/**repos/registry/trunk/public/**
>>> webgl/sdk/tests/conformance/**more/functions/**
>>> vertexAttribPointerBadArgs.**html<https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/more/functions/vertexAttribPointerBadArgs.html>
>>>
>>
>> Doesn't that call fail per current spec because the offset (-1) is not a
>> multiple of sizeof(float), independently of what negative offset handling
>> looks like?  My Gecko build with the negative offset check in
>> vertexAttribPointer removed passes this test, precisely for that reason:
>>
>>  VertexAttribPointer: byteOffset doesn't satisfy the alignment
>> requirement of given type @ https://cvs.khronos.org/svn/**
>> repos/registry/trunk/public/**webgl/sdk/tests/conformance/**
>> more/util.js:965<https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/more/util.js:965>
>>
>> -Boris
>>
>
> To be clear
>
> 1) AFAICT OpenGL does not allow negative offsets
>
> 2) WebGL should not allow them either.
>
> So,
>
> a) we should update the WebGL spec to make it clear negative offsets
> generate INVALID_VALUE
>
> and
>
> b) we should update the conformance tests to test that case.
>
> Agree?
>
>
> I agree, except for 1): I don't see where the OpenGL spec forbids negative
> offsets.
>

How do you get a negative offset in OpenGL? The function takes a pointer,
not an offset. To generate an offset the spec says "offset = pointer -
NULL" which is always positive.




> I agree that there doesn't seem to exist a valid use case for them. I
> would support forbidding negative offsets in WebGL for now, and having a
> conversation on that topic with the OpenGL WG.
>
> Benoit
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120423/2f271707/attachment.html>


More information about the public_webgl mailing list