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

Kenneth Russell [email protected]
Wed Jan 13 10:44:54 PST 2010


On Wed, Jan 13, 2010 at 9:16 AM, Giles Thomas <[email protected]>wrote:

> 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)
>

TEXTURE_2D is not a valid enable bit in OpenGL ES 2.0 or, consequently,
WebGL. The enum was in the EnableCap section only because it was there in
the OpenGL ES 2.0 headers. I've moved its definition to the TextureTarget
section.

-Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20100113/efe61720/attachment.html>


More information about the public_webgl mailing list