View Full Version : Frames per second counter
03-27-2001, 01:05 AM
Ive made a landscape generator and want to be be able to see how many frames per second it's running at. Does anyone know of any good programs that can do this?
03-27-2001, 03:09 AM
Write some font code, and display it yourself.
Very easy to do. Get some high precision timers (in win32 api) and time each frame.
then fps is merely 1.0f / frame time.
then just render it.
// gets the time
static float gettime(void)
static float told=0.0f;
// you hav a variable FPS, with some value:
#define FRAME 50
// and then you can call in your main render
if((framecount % FRAME)==0)
// now FRAME/fr is your FPS.
// it gets updates every 50 frames.
03-28-2001, 06:24 AM
There's a example who display the FPS on the screen.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.