View Full Version : How to run my proggie same speed on 2 pcs??
06-16-2002, 09:11 PM
How to make my OpenGL program run at same speed at 2 pcs? I've alredy tried this http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/005808.html but it seems it's win32 only, i need portable code! I use glut.
06-16-2002, 09:46 PM
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).]
06-16-2002, 09:56 PM
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....
06-17-2002, 03:21 AM
I get it working!
06-17-2002, 03:47 AM
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)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.