glTexGen with multitexturing

Hi,
Does anybody know how I can generate texture coordinates using glTexGen in multitexturing mode? If it’s not possible, is there any other command for coordinates generation, which I can use with multitexturing?

Thanks in advance

you just have to call glActiveTexture(GL_TEXTUREx) before calling texgen.

Thanks for your answer, but I did it, but I can’t see the second texture. Any other idea?

You might want to post your setup code (or a condensed form of it). You’re probably doing something wrong, but it’s difficult to just speculate on it.

Some possibilities:
-not using glActiveTexture
-not enabling texgen on both units
-not enabling texturing on both units

Good strategy: divide and conquer. You say you don’t see the second texture. This sounds like a texturing problem, not a texgen one. First get the texturing to work on both units, then get the texgen working. Use an all black texture on the 2nd unit with modulate texenv or something to test this.

Thanks -
Cass

Quick question:
how do I check if glActiveTexture is supported? I noticed it doesn’t come up in the string list (with my GF3) and I’m confident it is there.
Is it part of another extention?

glActiveTexture is supported if the OpenGL version is higher or equal to 1.3 (check it with glGetString(GL_VERSION)).
If OpenGL1.3 is not supported, you still can look at the equivalent function glActiveTextureARB which supported if “GL_ARB_multitexture” is part of the extensions string returned by glGetString(GL_EXTENSIONS).

About texgen, it is local to the texture unit just like texenv. That is, you can setup some texgen for the first unit and some other texgen for the second unit. You can as well enable or disable texgen for the first and second texture units independently.

[This message has been edited by vincoof (edited 04-23-2003).]