Track mouse motion to spin object

Hi all:
I want to create a function which tracks the mouse motion to spin the object in the glut window according the mouse movement. I think that glutMotionFunc should be the proper one to achieve the functionality. But I found that it’s hard to get the differences the mouse made and it’s hard to get the Z-axis movement. Does anybody know some good example of this issue please?
Thanks very much

have u tried measuring the dif in mous positions?

Yeah, the problem is I don’t know how to measure the dif in mouse position properly.

try dif = glMeasureMouseDelta().

In french, Mr and Miss Ritlecul has a child, what is its name ?