problems with texture_env_combine

Hi
i am trying to use the texture_env_combine extension, but it does’nt seem to work.
I use this code for rendering:

// Enable combining
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_COMBINE_ARB );
// just selecting primary color
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE0_RGB_ARB,GL_PRIMARY_COLOR_ARB );
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND0_RGB_ARB,GL_SRC_COLOR);
// no scaling
glTexEnvi(GL_TEXTURE_ENV,GL_RGB_SCALE_ARB,1);
// set combine operation replace
glTexEnvi(GL_TEXTURE_ENV,GL_COMBINE_RGB_ARB,GL_REPLACE);
// switching to second texture unit
glClientActiveTextureARB(GL_TEXTURE1_ARB);
// set everything to keep the result of the previous unit
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE0_RGB_ARB,GL_PREVIOUS_ARB );
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND0_RGB_ARB,GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV,GL_RGB_SCALE_ARB,1);
glTexEnvi(GL_TEXTURE_ENV,GL_COMBINE_RGB_ARB,GL_REPLACE);
glClientActiveTextureARB(GL_TEXTURE0_ARB);
// rendering
glDrawElements(GL_TRIANGLES, mesh->indexAnzahl, GL_UNSIGNED_SHORT, mesh->indices);

This should disable texturing, but i still get an textured model. Is there any other state i have to set ?
(I do this for testing, i know i can just disable texturing by setting glDisable(GL_TEXTURE_2D) but i need to get the combiners working)

thanks

Lars

Set new texture unit with glActiveTexture instead of glClientActiveTexture.

Thanks it solved the problem and a second one by looking thru all the places where i used activeTexture.

Lars

[This message has been edited by Lars (edited 07-25-2002).]