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

Re: [Public WebGL] UNPACK_COLORSPACE_CONVERSION_WEBGL added



I'm sure this discussion already happened so it would be nice to know the thoughts that lead to it to default to BROWSER_DEFAULT_WEBGL but without knowing that discussion it seems like it should default to NONE.

The reason is, most developers coming from OpenGL will not even bother to look at the docs. So, they'll write their app without setting this flag, it will appear to work on a particular browser because that browser happens to be doing what they expect (no conversion). Only later will they find out that it's not working in other browsers.

If it defaults to NONE, the worst that will happen is the colors will be off if compared to the same image displayed in an img tag but their app will still work. They can then look it up and find out how to get their colors correct but at least in the meantime their app works everywhere.

That would seem to match many of the other decisions to prevent apps from breaking across implementations.



On Tue, Oct 5, 2010 at 11:15 AM, Kenneth Russell <kbr@google.com> wrote:
At the recent Khronos F2F the WebGL working group resolved to add a
new pixel storage parameter UNPACK_COLORSPACE_CONVERSION_WEBGL,
applying to texImage2D and texSubImage2D uploads. The default value is
BROWSER_DEFAULT_WEBGL, and it can be set to NONE to disable all
colorspace conversion by the browser (if applicable to the file type
being uploaded -- in particular, PNG).

The rationale is that there are certain situations in which the four
channels of RGBA textures may contain non-color information, and an
upload path preserving the original values in the texture is needed.

The WebGL spec and IDL have been updated with this change, and a bug
has been filed with the OpenGL registry to add the two new enums.
Please post any comments to the list.

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