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

Re: [Public WebGL] Behavior of texImage2D on DOM element not ready to give an image surface

Thanks Gregg.

I believe that the spec needs to be clarified one way or another --- currently it's not easy to determine what it prescribes in the case where the DOM element passed to texImage2D is not ready to give an image.

So first of all, I agree that Firefox's current behavior (throwing) is bad.

The only reasonable options so far are
2) silently flag the texture as incomplete (hence sampling it as rgba 0,0,0,0) (your proposal)

I think I agree with you for solution 2). There is a valid concern against it (that it makes bugs harder to debug) but we already have this concept of incomplete textures anyways; the only news here would be that whether a texture is incomplete would start depending on undefined behavior (whether the DOM element loaded before the texImage2D call). While that undefined behavior is bad, is it there anyways, and we're not making it better by failing in a less graceful way.

So, I am in favor of 2). Opinions, anyone else?


On 13-02-02 01:46 PM, Gregg Tavares wrote:

On Sat, Feb 2, 2013 at 7:35 AM, Benoit Jacob <bjacob@mozilla.com> wrote:


Currently, in Firefox, texImage2D on a DOM element will throw an
exception if the DOM element fails to return an image surface. For
example that would typically happen on a video or image element that's
not yet loaded/decoded.

I seemed to remember that there had been some discussion about that and
some agreement to have more graceful behavior in that case, but I can't
find the discussion back and I don't remember what was decided.

The spec only mentions the possibility of throwing a security exception,
so I assume that throwing other kinds of exceptions, as we currently do,
is illegal?



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:
unsubscribe public_webgl