Matrix Multiplication

hi, just wanna ask this. We all know that using gluperspective or glulookat generates matrices. These matrices are used to transform the points. Does anyone know when the multiplication is done? I mean the exact point.

the modelview matrix is multiplied as soon as you do the gluperspective or glulookat.

// modelview is identity

// modelview is the camera matrix

// model view is camera matrix * translate matrix


the resulting point will be :

P = cam_matrix * translate * point_coordinates

you should read this paper :

at the beginning it explains all this very well, even if after it goes on explaining reflections.
good luck

gluPerspective and gluLookAt don’t just generate a matrix, they multiply that matrix with the current matrix. The multiplication is immediate, but it is a little more complicated than that.

There are two matrices – model-view and projection. Generally, you use gluPerspective with the projection matrix and gluLookAt with the model-view matrix.

When you call glVertex, the position is multiplied by both matrices to get the location on the screen.

U guys are superb. Thx a million. appreciate it.