Archived

This topic is now archived and is closed to further replies.

Turning texturing off.

This topic is 5803 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here is what I want to do: 1) Render a quad using a texture 2) Render another quad without any texture What I run into when I try to do this is that the texture I assigned to the first quad also applies itself to the second. Is there some glTurnTextureOff function that I can use to turn texturing off when rendering some polygons?

Share this post


Link to post
Share on other sites
glBindTexture(GL_TEXTURE_2D,0); will "unbind" the texture.

You could also call glDisable(GL_TEXTURE_2D), then re-enable it after.

I''m not sure if there''s a significant performance difference between the two approaches, but they both work.

Share this post


Link to post
Share on other sites
glDisable(GL_TEXTURE_2D) is better than glBindTexture(GL_TEXTURE_2D,0);

in fact i discourage binding to texture 0


http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Because that tells the graphics card "I'm done with that texture, you can unload it if you wish (i.e. if you need the memory)". Which can give you a performance hit as the card loads/unloads the texture every frame (extreme case, but could perfectly happen).

Disabling the texturing with glDisable() is much faster : you tell the card to just skip the texturing phase which reduces the processing required.

Edited by - Fruny on February 26, 2002 4:33:17 PM

Share this post


Link to post
Share on other sites
also if u wanna disable texturing which seems the more logical to use
also perhaps texture 0 will not always remain a plain white texture perhaps (like i do) if u pass an invalid texture u get a checkered pattern texture which really sticks out
(not explained well by me)

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites