You should think about the transformations taking place on the stack. In other words, the last conversion you specify takes place first. In this way,
glTranslatef(1,2,3); glScalef(10,10,10); glRotatef(45,1,0,0); drawObject();
first rotates 45 degrees around the x axis, then scales the object to (10,10,10), and then translates to (1,2,3). However, you should also remember that any transformation you apply affects subsequent transformations. If we change the order of the above transformations, the rotation will rotate around another point.
source share