Turning texturing off.
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?
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.
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.
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
in fact i discourage binding to texture 0
http://uk.geocities.com/sloppyturds/gotterdammerung.html
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
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement