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

Re: [Public WebGL] Move flipY and asPremultipliedAlpha parameters out of DOM helpers

On Sun, May 23, 2010 at 7:25 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
> On 20/05/2010 08:44, Cedric Vivier wrote:
>> After looking/playing with the DOM helper signature for a while I
>> believe that flipY and asPremultipliedAlpha should not be here :
>> - they are 'alien' to the standard texImage2D signature (one could
>> argue that this is the case for HTMLImageElement as well - but the
>> whole point for the helper signatures imho is to help treat the DOM
>> element parameter as if it was a proper *pixels pointer, this is
>> easily guessable too even without knowing WebGL but only OpenGL).
>> - behavior of flipY and asPremultipliedAlpha is not obvious when
>> reading code, those two booleans after 'element' cannot be guessed
>> without looking at documentation, worse, it is easy to forget or mix
>> the order of the two arguments ...
> Another really good reason for moving flipy from the TexImage2D
> signatures is that a future version of GL ES will provide this
> functionality but as part of the pixel store parameters not the
> TexImage2D command. Since this is a public forum, I can't say much more
> about it.

I'll follow up on the working group email list on this topic, but:

The fact that this functionality will be added to a future version of
OpenGL ES (and, by extension, WebGL) is a good reason to leave the
signatures as they are. If a WebGL-specific state setting is added, it
will directly overlap with this coming functionality.

The best options in my opinion are either (a) implement the future
OpenGL ES semantic in WebGL now or (b) leave these helper signatures
as they are, and expect that additional, preferred overloads will be
incorporated in a future version of WebGL.


> The traditional way to avoid the confusion you mention is to use enums
> or defines instead of true & false Another way to alleviate it is to put
> both parameter name and type in the function signature. I don't know if
> either are applicable to IDL.
> Regards
>    -Mark

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: