Multitexturing with Vertex Arrays & Shaders (Quake III renderer)

I’ve a little problem with my engine.
It use shaders that are based on Quake III’s for rendering state of faces. Each renderer may have texture distorsion, like texture coordinates translation/rotation/scaling… For this I alter the texture matrice.

Now all works perfectly without multitexturing. But can I use 2 texture matrice, one for each of the 2 texturing passes when I use multitexturing? Because when I activate my multitexturing code, both texturing pass gets altered.

Seems that there is only one texture matrice, common for the 2 multitexturing unit.

Am I right? Then the only solution would be to alter texture coordinate in my engine before sending them to OpenGL…

[This message has been edited by tfpsly (edited 03-07-2001).]

taken from the 1.2.1 spec (link first page)

the matrix mode to TEXTURE causes the already described matrix operations
to apply to the texture matrix.
There is also a corresponding texture matrix stack for each texture unit.
To change the stack a
ected by matrix operations, set the active texture
unit selector by calling
void ActiveTextureARB( enum texture );
The selector also a
ects calls modifying texture environment state, texture
coordinate generation state, texture binding state, and queries of all these
state values as well as current texture coordinates and current raster texture

Exactly what I wanted!
Thx a lot