OpenGL code order
- OpenGL maintains the current transformation;
- Each OpenGL function call that defines a transformation, postmultiplies the current matrix:
- All functions setting transformations should be before the object is drawn
- The order of function calls corresponds to the order of matrices in math notation:
glRotate(theta,ax,ay,az);
glTranslatef(tx,ty,tz);glScalef(sx,sy,sz);