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

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



Agreed.

For many WebGL functions taking GLfloat, it is actually very important
to _not_ throw, because these floats are often the result of nontrivial
arithmetic, and nontrivial floating-point arithmetic does produce
non-finite values, and good floating-point API design is to handle such
non-finite values gracefully.

So it's actually very important to make GLfloat unrestricted.

For GLclampf, I don't know. Since GLfloat must be unrestricted, and IIUC
current browsers implement unrestricted anyways, it may be simpler to
keep it unrestricted. That may also be a good idea as GLclampf's too may
be the result of nontrivial floating point operations.

TODO: check the status of Float32 in typed arrays.

Benoit


On 12-11-19 09:06 AM, Boris Zbarsky wrote:
>
> On 11/19/12 8:48 AM, Gregg Tavares (社用) wrote:
>> I don't think it should throw. It should just pass them on.
>
> OK.  Then the simplest thing to do is probably to change GLfloat and
> GLclampf to be typedefs for "unrestricted float".  And probably change
> the various sequence<float> to sequence<unrestricted float> or
> sequence<GLfloat>.
>
> -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
-----------------------------------------------------------