[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 Thu, May 20, 2010 at 10:03, Kenneth Russell <kbr@google.com> wrote:
> I am objecting to both. First, the overloading of texParameteri has
> very poor implications as I've already pointed out.

Those implications are only consequence of the supposed requirement
that changing a texture parameter value must have an immediate effect,
without that assumption it is just similar to state bit it as Gregg
pointed out.

> Second, I see no
> advantage to changing these two flags to state bits that must be set
> before calling texImage2D,

Could you give disprove advantages I discussed ?
(simplified documentation for most common usages, greater
extensibility, better code readability, unified usage model for
similar features in future WebGL revision and/or extension)

About extensibility, in fact the second example CROP_RECT texture
parameter could be a nice inspiration for a WebGL extension that would
allow directly loading *part* of an HTML image via texImage2D. Using
similar features in a similar way is a sign of a well-designed API.

> and several disadvantages, including making
> developers write more code

Okay that is one argument, I would argue it is a minimal price to pay
for the advantages above, especially considering this is not that
common (not seen much/any demo making use of these features yet), and
because JavaScript libraries can efficiently provide better named
wrappers for these (e.g declare a gl.texImage2DFlipY(..., img, ...)
that sets the texture parameter before the native texImage2D call).

> and requiring the WebGL spec to specify new
> enums.

This can be worked out, and it's just about time we finally reserve
one block or two for WebGL usage (we'll need enums - for core or
extensions - at some point).

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: