
Parametric Equations
Hi, I was wondering, how I could use time in my OpenGL projects? All, I really need to know is how to get the value of the computer time (clock in bottom right
). Or is there just a simple way to get a variable that moves up/down in value every x seconds/minutes/etc?
I was planning on using it for a parametric equation, but maybe some of you know a better way...

if you''re using c++ and MSwindoze look at
GetTickCount
here is a tutorial that speaks bad of GetTickCount and gives an alternative.
http://www.codeproject.com/csharp/highperformancetimercshar.asp
GetTickCount
here is a tutorial that speaks bad of GetTickCount and gives an alternative.
http://www.codeproject.com/csharp/highperformancetimercshar.asp
[size="2"]I like the Walrus best.
From winmm.lib:
DWORD timeGetTime();
(use timeBeginPeriod(1) and timeEndPeriod(1) at the start/end of your program to get better accuracy on most computers)
Or:
BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpPerformanceCount);
Using these two gets you far more precise measurements, but it uses 64-bit integers.
int Agony() { return *((int*)0); } Mwahaha... >8)
DWORD timeGetTime();
(use timeBeginPeriod(1) and timeEndPeriod(1) at the start/end of your program to get better accuracy on most computers)
Or:
BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpPerformanceCount);
Using these two gets you far more precise measurements, but it uses 64-bit integers.
int Agony() { return *((int*)0); } Mwahaha... >8)
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement