Jump to content
  • Advertisement
Sign in to follow this  

how to disable multi texturing?

This topic is 3405 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

i added some multi texturing: glActiveTextureARB(TextureLayer[Layer]); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture1); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, BlendFunction); but after using it i wanted to use some normal textures. i tried looping throught all the texture units and disable them by: for (i = 0; i < MAX_TEXTURE_UNITS; i++) { glActiveTextureARB(TextureLayer); glBindTexture(GL_TEXTURE_2D, NULL); glDisable(GL_TEXTURE_2D); } but still, when i try to set a normal texture ona mesh with: glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); the mesh has no texture. i think this happens because im still 'on' the last texture unit (because of the glActiveTextureARB above), so i basically active that texture unit again or something like that. so how do i get free from beeing on multi texturing and return to use a single normal texture?? thanks.

Share this post


Link to post
Share on other sites
Advertisement
There's non difference between multi texturing and single texturing, other than the number of texture units you have enabled. There's no way to explicitly disable it, since it's really just a concept, where single texturing is just one of the cases covered by multi texturing.

So, to get a single texture on the first texture unit, then that is the settings you need to use. That is, make sure other texture units are disabled and the first one is activated.

Share this post


Link to post
Share on other sites
ahh cool, now i get it. glActiveTextureARB(TextureLayer[0]); fixed the problem.

thanks :)


[Edited by - TheNess on January 23, 2009 12:43:17 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!