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

Re: [Public WebGL] Should GLfloat and GLclampf be typedefs for "unrestricted float"?



On Mon, Nov 19, 2012 at 7:48 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>
> On 11/19/12 10:35 AM, Benoit Jacob wrote:
>> So it's actually very important to make GLfloat unrestricted.
>
> Great.  I'll do that and the same for the sequence<float> bits.
>
>
>> That may also be a good idea as GLclampf's too may
>> be the result of nontrivial floating point operations.
>
> Sounds good.

http://www.khronos.org/registry/webgl/specs/latest/ has been updated
with these changes. Throughout the spec, sequence<float> has been
replaced with sequence<GLfloat>. Please review.

There are potentially some return values that need to be updated too:
getParameter(DEPTH_CLEAR_VALUE), getUniform, etc. I think the best way
to address this would be to reuse the GL typedefs at the top of the
file throughout the spec rather than referring to Web IDL primitive
types directly. Do you agree?


>> TODO: check the status of Float32 in typed arrays.
>
>
> Completely undefined, as far as I can tell.  The pseudo-idl in that spec
> looks like this:
>
>   interface TypedArray {
>   ...
>     setter void set(unsigned long index, type value);
>
> but it doesn't define anywhere that "type" is.  There's a table above that
> talks about "Equivalent C Type", but not which WebIDL type corresponds to
> which typed array type...
>
> In practice, I believe UAs treat these as unrestricted, and the spec talks
> at length about NaN behavior that makes no sense for restricted floats, so
> when this spec is fixed to actually define something it should use
> unrestricted float and unrestricted double.

Let's clean this up.
https://www.khronos.org/registry/typedarray/specs/latest/typedarray.idl
does define the precise IDL (though the spec should too). It would be
great if it were possible to generate the Typed Array IDL from the
spec by instantiating the pseudo-templates in the spec.

-Ken


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

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