[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Adding internalformat param to all texImage2d variants
On Thu, May 20, 2010 at 01:36, Gregg Tavares <email@example.com> wrote:
> We're trying to add all kinds of conversion stuff to texImage2D that may or
> may not make sense.
There would be only the few basic conversions done by OpenGL's
texImage2D, conversions are not available in ES because it can be done
in software efficiently...
Problem is that WebGL cannot do such conversions efficiently from
and from native to JS runtime, hence providing the usual OpenGL
conversions with same signature makes sense in both performance,
convenience and API usability (no surprise, HTMLImageElement is the
equivalent of *pixels).
> How do the types UNSIGNED_SHORT_5_6_5, UNSIGNED_SHORT_4_4_4_4 and
> UNSIGNED_SHORT_5_5_5_1 fit into these conversions? For example one of the
> arguments for supporting conversion to LUMINANCE and ALPHA formats was space
> savings but if that's the argument for supporting conversions then it
> applies to these types as well.
True, but types are only a hint in ES so that is probably less of an
issue since ES drivers can do that for us.
> It really seems all this conversion belongs outside of texImage2D. add
> ArrayBuffer ctx.convertTo(img, format, ....) or something like that.
Doing that will just make the API more difficult for experienced
OpenGL / ES users.
Also as discussed in another thread it would limit extensibility that
is given by using one standard GL API.... e.g extensions that provides
new internal format.
Consider if new ES revision supports conversions like GL or some
subset of it (e.g for on-the-fly compress), we would not be able to
support that in a new WebGL revision without introducing the
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: