[Public WebGL] gl.enable(gl.TEXTURE_2D)

Giles Thomas [email protected]
Wed Jan 13 09:16:11 PST 2010


Hi all,

Is gl.enable(gl.TEXTURE_2D) required by the spec to switch on texture
support?  On the wiki, Gman just removed a line to that effect from the
tutorial page, commenting that it's not valid WebGL; the spec seems to
support this but there's some ambiguity.  Here's the diff:

<
https://www.khronos.org/webgl/wiki_1_15/index.php?title=Tutorial&diff=132&oldid=67
>

On the one hand, the description of the enable method in the spec 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's view.

On the other, 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've tried removing the enable() call from line from some of my own WebGL
pages and tried them in Minefield and Chromium, and there's no obvious
effect to having it there.

Any clarification much appreciated -- if it's not meant to be passed to
gl.enable(), then I'd suggest that TEXTURE_2D should be moved elsewhere
(perhaps to the TextureTarget section)


Cheers,

Giles
-- 
Giles Thomas
[email protected]
http://www.gilesthomas.com/
http://learningwebgl.com/
http://www.baroque-project.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20100113/afd56e3e/attachment.html>


More information about the public_webgl mailing list