OPENGL matrix sequence in reverse order with the call

OpenGL various conversion is implemented by a matrix operation, specifically, that when issuing a conversion command, which generates a 4X4 transformation matrix of order (in OpenGL all object coordinates using homogeneous coordinates, i.e., (x , y, z, w), so that all the transformation matrices are used 4X4 matrix), a matrix is multiplied with the current transformation matrix, to generate a new current matrix. After e.g., vertex coordinates v, conversion command is typically issued before the vertex coordinates of the command, if the current matrix is C, the matrix switch command configuration is M, is issued conversion command, generates new current matrix is the CM, the matrix is multiplied by vertex coordinates v, thereby forming a new vertex coordinates CMv. Procedure described above, a conversion program to draw the last previous command was first applied to the apex above the apex. It also shows, OpenGL programming, the actual order of the conversion in the specified order is reversed.

Guess you like

Origin www.cnblogs.com/canyeweiwei/p/11746298.html