glTranslate - glRotate

On which matrix does process glTranslate and glRotate ?
The one choose by glMatrixMode or always GL_MODELVIEW ?

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(dx,dy,dz);
or
glRotatef(angel,dx,dy,dz);

Originally posted by Matthieu DUFOURNEAUD:
On which matrix does process glTranslate and glRotate ?
The one choose by glMatrixMode or always GL_MODELVIEW ?

glTranslate* and glRotate* will affect whatever matrix is the currently active matrix.

For example:

glMatrixMode(GL_TEXTURE);
glRotatef(angle, 0.0f, 1.0f, 0.0f);

The above code would rotate the texture on your object. Of course, you’d probably want to glPushMatrix() and glPopMatrix() around the changes to the texture matrix, and restore the modelview matrix after you were done.

Hope that helps.