Ok, so i’ve implemented multitexturing, but don’t know how to de-activate when i’m done.
I’ve implemented the operation:
(tex1+tex2)*color
where tex are the 2 textures (large-scale and detail), and color is used to do per vertex illumination.
I’m using this code to initialize the thing:
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);
The problem is that all the things I render after this get affected by multitexturing as well, but i want to “shutdown” the system and go back to plan 1-pass rendering. I’ve tried glDisables but no success so far.
Anyone can help me?