Multitexturing Conflicting with Single Texturing

Hello,

I have been using single texturing for my terrain and models in my scene.

I then decided to add multitexturing for the terrain, which works fine.

But, somehow the single texturing no longer works. The models are no longer textured, nor is the skybox.

Somehow I’ve got to be able to activate and deactivate the multitexturing when I need it. But, I’m not sure how. I suppose I could implement multitexturing for everything, but would prefer to keep the code as is if possible. Any feedback would be appreciated.

Thanks!

Below is part of the code I’m using for the terrain.

renderTerrain() {
lActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, g_oTM.getTex(textureIdx0));
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, g_oTM.getTex(textureIdx1));
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);

//Render Triangle Strips Here
}

lActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);

when you want to disable multitexturing

Thanks, chxfryer, but I’d tried that first, and it had no effect. :stuck_out_tongue: