From WebGL Public Wiki
Jump to navigation Jump to search

Gman just removed a call to gl.enable(gl.TEXTURE_2D) from this tutorial, commenting that it's not valid WebGL. I've tried removing the equivalent line from different WebGL pages (I didn't have a copy of this one to hand) and it doesn't appear to have any effect, but the spec seems ambivalent on the validity of that call. The description of the enable method says that it's directly equivalent to the OpenGL ES 2.0 glEnable call, which does not list TEXTURE_2D as a valid value, which supports Gman view. On the other hand, the TEXTURE_2D constant is defined in the spec in a section called EnableCap, which also defines CULL_FACE, BLEND, and other constants that the ES 2.0 spec says are meant to be used with enable.

I suspect that Gman is right, and the constant is just in the wrong place, but clarification would be helpful. I'll cross-post this to the public WebGL mailing list to see if anyone has any opinions there.

--Giles 17:08, 13 January 2010 (UTC)

[Update] Kenneth Russell on the list confirmed that the constant is just in the wrong place in the spec. The change is valid.

--Giles 18:37, 14 January 2010 (UTC)


This is a dead link. QuentinUK (talk) 11:26, 20 March 2015 (UTC)