the use of glActiveTextureARB(GL_TEXTURE0_ARB);

hi there !

hum, new problem with multitexturing (well i’m not sure about the problem though) :
i’m making a function that draw a cube, then texture or multitexture it. so far, alright
but there was the same texture on each face. To draw a room for instance, i needed a texture (or 2 or 3) for the walls and 2 or 3 for the floor, and then 2 or 3 for the ceiling.
but when i do so :

glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, 1);

glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D, 9);

glActiveTextureARB(GL_TEXTURE3_ARB);
glBindTexture(GL_TEXTURE_2D, 13);

(the 2 first are on the same face, and the third on on another) i lost the multitexture on the 2 tex wall, and i got nothing on the second face…
so i was asking if anything was wrong about using GL_TEXTURE3_ARB without using GL_TEXTURE2_ARB (though i wouldn’t really see why), or if anybody had an idea

thx a lot for your help - wizzo

Does Your card supports more then 2 texture units?

well its a gf4 ti 4200 so i think that it is suppose to be 4 texture unit
the driver installed are not the latest ones but they are quiet recent though

hum…

i did a simple test, a quad with 3 texture on it (am i doing it right, here’s the code

glBegin(GL_QUADS);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 1);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1, 1);
glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 1, 1);
glVertex3i(-10, 0, -10);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0, 1);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0, 1);
glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 0, 1);
glVertex3i(10, 0, -10);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0, 0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0, 0);
glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 0, 0);
glVertex3i(10, 10, -10);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1, 0);
glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 1, 0);
glVertex3i(-10, 10, -10);
glEnd();

and once i only have the first texture, but at another try, i had 2 of the 3 textures…
really odd

[This message has been edited by wizzo (edited 07-16-2003).]