PDA

View Full Version : Texture Coord Generation with Multitexturing



jeppa
04-28-2002, 05:29 AM
is it possible generate texture coords for only one texture when I use multitexturing???

es:
Texture 0 with its TextureCoords.
Texture 1 with generate texture coords;

Thanks is advance.

davepermen
04-28-2002, 06:43 AM
yes


longer answer:
glActiveTexture(GL_TEXTURE0);
glBindTextureXY(blah);

glActiveTexture(GL_TEXTURE1);
glEnable(GL_SOMEGENERATOR_S);
glEnable(GL_SOMEGENERATOR_T);
glEnable(GL_SOMEGENERATOR_R);
glEnable(GL_SOMEGENERATOR_Q);
glBindTextureXY(blah);

glBegin(GL_BLAHBLAH); {
glTexCoordXY(blah); //glTexCoordXY == glMultiTexCoord(GL_TEXTURE0,blah) !!
}glEnd();

Nutty
04-28-2002, 07:22 AM
Also, you need to setup the kind of Tex coord generation per texture unit.

Most ppl seem to think it's nicer to setup your TMU's in reverse order. i.e. start with top unit and work down. That way when you're finished, Tex unit 0 is your active unit, which helps prevent ppl being caught out, when they have bugs, cos they dont know which is their active unit.

Well I find it nicer that way.

Nutty