Hi Ken.

Sorry for late.

I know that those states are per object of course. But let me explain why I did that.

When I fixed the bug https://bugzilla.mozilla.org/show_bug.cgi?id=879952 , I've found a bug directly in the gecko's code ( https://bugzilla.mozilla.org/show_bug.cgi?id=879952#c5 ), and there wwas any test showing that bug. That's why I'm creating it. Therefore, the WebGL call sequence on this test is very precise even it seams to have no sense. And Firefox failed that test before my patch.

Thank you !

Guillaume.

On 2013-06-29, at 4:40 PM, Ken Russell <notifications@github.com> wrote:

> In sdk/tests/conformance/textures/texture-fakeblack.html:
> 
> > +    
> > +    var texture0 = createTexture(gl,1,0,0,1);
> > +    var texture1 = createTexture(gl,0,1,0,1);
> > +    
> > +    gl.bindTexture(gl.TEXTURE_2D, texture0);
> > +    gl.drawArrays(gl.TRIANGLES, 0, 6);
> > +    wtu.checkCanvas(gl, [255, 0, 0, 255]);
> > +    
> > +    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
> > +    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
> > +    gl.drawArrays(gl.TRIANGLES, 0, 6);
> > +    wtu.checkCanvas(gl, [0, 0, 0, 255]);
> > +    
> > +    gl.bindTexture(gl.TEXTURE_2D, texture1);
> > +    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
> > +    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
> These two texParameteri calls are unnecessary. The WRAP_S and WRAP_T state is per texture object, not per texture unit. When texture1 is bound, the texture state set up in createTexture takes effect.
> 
> —
> Reply to this email directly or view it on GitHub.
>