TexEnv syntax?

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_RGB_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PRIMARY_COLOR_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_COLOR);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);

I use this code to do my bumpmapping. When I go beyond 2 texture units, the last used unit, say 3, gets blended with the bumpmap instead of the 2nd unit. Why? I’m trying to get the 3rd texture unit to add to the previous two.

If I can grasp the syntax of TexEnv, then coming up with solutions to other effects should be no problem.

Sure you have card that have three or more texture units?

I just found out my GeForce2 only supports 2 units . I was under the impression that it supported up to 8 for some reason.

Can you explain what GL_SOURCE0_RGB_EXT, GL_OPERAND0_RGB_EXT, GL_PRIMARY_COLOR_EXT, GL_SRC_COLOR and GL_TEXTURE are doing?

I’m assuming all those commads only work when you set the env mode to combine. SO when you set it to modulate it doesn’t do any of that stuff.