when i want to implement some modeling transform, i want to know wether there are different implement order below:
the first method is using remember and go back way:
glPushMatrix();
glRotatef(72.0,0.0,0.0,1.0);
glTranslatef(3.0,0.0,0.0);
…
glPopMatrix();
the second is transforming directly:
glRotatef(72.0*i,0.0,0.0,1.0);
glTranslatef(3.0,0.0,0.0);
…
are they different or not?
sorry, sometime, I wonder that transforming models directly may has a different implement order from transforming them using matrix stack, that means, if I transform a model directly:
glTranslate();
glRotate();
then the implement order is rotate first then translate
if I use matrix stack,
glPushMatrix();
glTranslate();
glRotate();
glPopMatrix();
the implement order is translate first then rotate.
I just suspect these two ways may have different implement order, but now I find I was wrong, the implement order should has nothing with using matrix stack or not.