Fix the rotation order: last called glRotate is done first, but we want it behave opposite to this.
Solution: use a container to store the order of glRotate and glPopMatrix + glPushMatrix to restore the original matrix.