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
1) generate a WebGL INVALID_OPERATION
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: