How to run my proggie same speed on 2 pcs??

How to make my OpenGL program run at same speed at 2 pcs? I’ve alredy tried this but it seems it’s win32 only, i need portable code! I use glut.

Yeah QueryPerformanceCounter is win32 only. But in any case you’ll have to a call a system-dependant function, because I don’t think there’s a portable library for time measures. The glutGet (GLUT_ELAPSED_TIME) functionnality of glut won’t do, because it has millisecond accuracy, which is not enough for your purposes. So you’ll have to find an equivalent for QueryPerformanceCounter for your OS. If you don’t find the answer here, you could search books/forums specific to your OS.


[This message has been edited by Morglum (edited 06-16-2002).]

Yes glut timer is too ****ty, i tried it with frameskip and it worked… in beginning, after that, it get slower and slower and slower and slo…

I get it working!

I know nothing about this but why not use your own timer func?

t1 = clock(); /** regulate frame rate **/
t2 = clock();
if(((double)(t2-t1) / CLOCKS_PER_SEC)