I can't work out how the samples obtain the frame rate??
I can get it myself using timers but thats somewhat messy. Could somebody explain to me how this is done please?
I can't work out how the samples obtain the frame rate??
I can get it myself using timers but thats somewhat messy. Could somebody explain to me how this is done please?
ArA¬± tHArA¬ß wA¬?Ar|A_ gA¬?A¬±A< mA¬•A_, wA< wAr|| A¬±A¬? |A¬?A¬±gA<Ar A¬ßA_A¬•A¬±k tHA< mA¬?A¬±kA<A¬•, tHA< mA¬?A¬±kA<A¬• wAr|| A¬ßA_A¬•A¬±k A¬ºA¬ß. - J
basicly, have a global integer. increment it on every render. then every second, print out the number and set back to 0.
theres a better way but thats the best way to get u started
Here si the code I use :
Code:var // global Time : Cardinal; FPS : Cardinal; [...] [Procedure render] if GetTickCount - 1000 > Time then Begin // Print FPS FPS := 0; Time := GetTickCount; end else inc(FPS);
Ahh course, I never thought of using TickCount. Before i was using the same method but a timer to count the seconds
Thnx guys
ArA¬± tHArA¬ß wA¬?Ar|A_ gA¬?A¬±A< mA¬•A_, wA< wAr|| A¬±A¬? |A¬?A¬±gA<Ar A¬ßA_A¬•A¬±k tHA< mA¬?A¬±kA<A¬•, tHA< mA¬?A¬±kA<A¬• wAr|| A¬ßA_A¬•A¬±k A¬ºA¬ß. - J
Bookmarks