PDA

View Full Version : Translate goes very fast



GreenCat
04-26-2005, 10:15 PM
I am using glTranslate(..) by inputing the mouse values into glTranslate like this glTranslate(Xmouse,Ymouse,0) in the main render. This is working just fine.

But also in the main render i translate the object by changing its real values by multipling with the translate matrix. Again in this case i use the mouse values . But here the problem is that my object is moving extremely fast . Is it because there are lots of frames per seconds and the mouse values are not changing so often in the main render ??

I get the mouse values with glutMotionFunc().

But why in the first case with glTranslate() is working ?

CWiC
04-27-2005, 12:10 AM
It seems like in second case you accumulate your values and it grows with time extremely, while in first scenarion you use absolute values which not accumulated.