peter.vullings
06-10-2003, 08:54 PM
Ok, now that I know all transformations on the stack are applied to each vertex drawn, I have a few more questions:
1) glTranslatef and glRotatef operate on the top of the stack right? And they are multiplied by whats already there, so they are cumulative?
2) DOes the order of glTranslatef and glRotatef matter? To my thinking, it probably does. e.g:
glTranslatef(3.0f, 0.0f, 0.0f);
glRotatef(10.0f, 1.0f, 0.0f, 0.0f);
draw_cube();
This is whats required, but if I do the rotation first, would the translation now be skew-wiff because the axis are now aligned differently?
Thanks in advance,
Peter
1) glTranslatef and glRotatef operate on the top of the stack right? And they are multiplied by whats already there, so they are cumulative?
2) DOes the order of glTranslatef and glRotatef matter? To my thinking, it probably does. e.g:
glTranslatef(3.0f, 0.0f, 0.0f);
glRotatef(10.0f, 1.0f, 0.0f, 0.0f);
draw_cube();
This is whats required, but if I do the rotation first, would the translation now be skew-wiff because the axis are now aligned differently?
Thanks in advance,
Peter