[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Adding internalformat param to all texImage2d variants
On Wed, May 19, 2010 at 05:36, Chris Marrin <email@example.com> wrote:
> NONE or NO_CONVERSION would not literally perform no conversion on the input image. It would rather make a texture that matches the original image format. Since WebKit/Chrome and Firefox both store images internally in RGBA (converting images from 1 or 2 channel formats if needed), specifying NO_CONVERSION of a 1 channel image will actually have to convert it back from RGBA to 1 channel. Of course that's an implementation detail and we could always store the original format for avoid that double conversion. But I can't see doing that in WebKit in the short term anyway...
Yes indeed, potential interim conversions are implementation detail
but the result for end user/developer is identical to no conversion...
and could be no conversion at all in implementations that do such
image loading optimizations.
>But these function already diverge. They are a bridge between HTML and WebGL. They also support y flipping and alpha premultiplying, which are >divergent. We need to make them useful to the HTML author, not matching OpenGL.
Yeah but coming from native ES or GL, you could think of the
HTMLImageElement as an "unsigned char*" that has been populated
through libpng or similar. With the a GL-like signature of the helper,
porting is trivial to do because the order of the required parameters
is the same : native code calling texImage2D(...RGB ... RGB ...
&bytes_from_a_png_loaded_as_rgb) can be directly ported to
If we add a completely 'alien' convertTo parameter this completely
changes that nice characteristic, this is what I meant by diverging
You are currently subscribe to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: