playing around with the TEXTURE MATRIX

Hello!

here is my problem:
i render a simple cube with some textures on it to see something on screen. now i want to scroll ONE texture. i change to the TEXTURE matrix, do my translation and switch back to the MODELVIEW matrix. but all i get is that all textures scroll…
and i dont know why.

(for better understanding, here is a piece of pseudo code)
Vid_Render()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();

RenderShader();
}

RenderShader()
{
struct stShaderBase *p = (structstShaderBase *)pShaderTable[iID].pData;

if (p->bScroll)
{
glMatrixMode(GL_TEXTURE);
glTranslatef(p->fXMove, 0.0f, 0.0f);
glMatrixMode(GL_MODELVIEW);
}
}

hope you can help me.
regards, and happy easter!

  • Christoph -

after youre finished + just before u leave the texturematrix do a glLoadIdentity()