Getting FPS

Posts: 45
Joined: 2002.04
Post: #1
I have a GLUT template setup that I will soon start filling in with my code, and I have a timer setup to fire every 1/60 of a second... so my game code will get executed every 1/60 of a second..

How would I go about setting up an FPS counter? Since my draw function is continuously drawing irrespective of my timer...

I thought about just adding to a counter everytime my draw function was called.. but now that I have thought about it.. that makes little sense..

any ideas on how i should approach this..

I am using the the GLUT event loop right now so i am not looping with my own function..


/* Drunk...... fix later.... */
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
Search the forum. I've answered it before (with specific reference to GLUT IIRC).
Quote this message in a reply
Post Reply