Results 1 to 4 of 4

Thread: Another Day, Another Question. Frames Per Second

  1. #1

    Another Day, Another Question. Frames Per Second

    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

  2. #2

    Another Day, Another Question. Frames Per Second

    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

  3. #3

    Another Day, Another Question. Frames Per Second

    Here si the code I use :

    Code:
    var // global
      Time &#58; Cardinal;
      FPS &#58; Cardinal;
    
    &#91;...&#93;
    
    &#91;Procedure render&#93;
    
    if GetTickCount - 1000 > Time then
    Begin
      // Print FPS
      FPS &#58;= 0;
      Time &#58;= GetTickCount;
    end
    else inc&#40;FPS&#41;;

  4. #4

    Another Day, Another Question. Frames Per Second

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •