How to find displacement in OpenGL ?

Hi,

I am facing a issue as to how to move a openGL object from one point to other by finding the displacement(with respect to speed)?? Please help!!!

double deltaT = currentFrameTime - previousFrameTime;
previousFrameTime = previousFrameTime;
glTranslate(speedXdeltaT,speedXdeltaT,speedX*deltaT);

Thanks for the reply…
i am trying to move the object with respect to the “Simulation Time” as the project is concerned with simulation.So can you please suggest a way to find the simulation time so that i can proceed to find the displacement.

This ‘simulation time’ is totally unrelated to OpenGL, this will depend on your OS/platform/libraries etc.
An example with glut :
http://hdrlab.org.nz/articles/amiga-os-a…ion-using-glut/