Why gluUnProject returns incosistent Obj Coords?

I just wondering why if I change the orientation of the view for example:


glTranslatef(0.0, 0.0, 0.0);
glScalef(1.0, 1.0, 1.0);
glRotatef(720, 1.0, 0.0, 0.0);
glRotatef(360, 0.0, 0.0, 1.0);

gluUnProject Coords: objx = -0.488667 objy = 0.025000 objz = -0.499775

When I do rotation, scaling & tranlation for ex:

glTranslatef(0.105000, -0.370000, 0.000000)
glScalef(1.100000, 1.100000, 1.100000)
glRotatef(697.000000, 1.0, 0.0, 0.0);
glRotatef(328.333344, 0.0, 0.0, 1.0);

gluUnProject Coords: objx = -0.338066 objy = -0.303501 objz = -0.625457

Does gluUnProject really behaves this way?

I just followed this article:


It just returns a current coords.

When you rotate the Obj ,all the coords of the obj have been change too.

but I know these are some ways to get back the init coords.

Do you know how to get back to INIT coords without changing the orientation of the view or redrawing the screen?

I haven’t done any UnProject at all. But I think the best thing would be to get the invert of the matrices, then multiply the coordinates with the matrix.