[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:40, Gregg Tavares <gman@google.com> wrote:
> At a minimum I personally think we should be shooting for the OpenGL version
> (not ES) of texImage2D where source format is separate from destination
> format and the overloaded helpers are only specifying the source format
> automatically since they have that info.

100% agree, but please let's discuss about format conversions in the
other thread for ease of following thoughts :-)

> Option #3 has the beauty that you can add more and more options over time
> and not break any function signatures.
> ctx.texImageConversionParam(ctx.COMPUTE_GRAYSCALE_WITH_COLOR_BIAS, 1);
> ctx.texImageConversionParam(ctx.FLIP_Y, 1);

Yes, this is the idea and greatest benefit of having
flipy/premultipliedalpha options as WebGL-specific texture parameters
instead of WebGL-specific texImage2D arguments.
Any option can be added over time without breaking or adding
texImage2D signatures, also each option can be more finely tuned as it
does not have to be a boolean or one parameter only : e.g
texParameterfv(WEBGL_DOM_GAMMA_CORRECTED_EXT, [2.0, 2.0, 1.0, 1.0]) to
provide correction values for each channel).

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: