View Full Version : BindTexture(GL_TEXTURE_2D,0) is validate?

10-20-2004, 04:31 PM
I use "glBindTexture(GL_TEXTURE_2D,0)" to disable texture in my program,is it validate?Will it crash in some card?

10-20-2004, 07:43 PM
That's perfectly valid, and won't crash any card.

However, it does not turn off texturing. To turn off texturing, call glDisable(GL_TEXTURE_2D).

10-20-2004, 10:22 PM
Some more explanation why that is totally valid and useful:
When using textures without texture objects, you're using the "immediate" texture of the enabled texture unit. (This was the only texture OpenGL had before there were texture objects and OpenGL 1.0 required to put textures into display lists to get an object-like behaviour. Don't do that today!)
This "special" texture object always exists and got the number 0.
The call above is the only way to go back from a previously bound texture object to that immediate texture.