texture animation

i need move the texture in the scene, i try that:

glLoadIdentity();
glMatrixMode(GL_TEXTURE);
glTranslatef(textras,textras,textras);
glMatrixMode(GL_MODELVIEW);
glFlush();

glLoadIdentity();
glColor4d(0,0,0,0.5);
glBlendFuncGL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glRotatef(lookupdown,1.0f,0,0);
glRotatef(sceneroty,0,1.0f,0);
glTranslatef(xtrans-50, ytrans-1, ztrans-550);
glRotatef(-90.0f,1.0f,0.0f,0.0f);
glRotatef(90.0f,0.0f,0.0f,1.0f);
glScalef(2.0f,2.0f,2.0f);
glCallList(AguaG);
glFlush();

the problem is this code move all the textures in the scene, not only the textures in the list, i try with glpop and glpushmatriz but not work… what is wrong?

glMatrixMode(GL_TEXTURE);
glTranslatef(textras,textras,textras);
glLoadIdentity(); <- u need to set it back to identity when youre finished, opengl is a statemachine ‘ie once something is on it will stay on until turned off’

To clarify a bit what Zed is saying, you need to, after you draw the geometry that uses the texture matrix, set the texture matrix back to the identity with glLoadIdentity().

It has to be like this…

glLoadIdentity();
glMatrixMode(GL_TEXTURE);
glTranslatef(textras,textras,textras);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

glColor4d(0,0,0,0.5);
glBlendFuncGL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

glRotatef(lookupdown,1.0f,0,0);
glRotatef(sceneroty,0,1.0f,0);
glTranslatef(xtrans-50, ytrans-1, ztrans-550);
glRotatef(-90.0f,1.0f,0.0f,0.0f);
glRotatef(90.0f,0.0f,0.0f,1.0f);
glScalef(2.0f,2.0f,2.0f);
glCallList(AguaG);

glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);

//… other code

glFlush();

And plz notice only one glFlush per frame - in the end.

not work (snif) any other idea?