Toby Howard :: Toby's Tips :: Simple OpenGL frame rate counter

This is a very simple free general purpose frames per second counter for OpenGL/GLUT programs.

It displays "Frames per second: N" at an arbitrary position in the window. It safely doesn't disturb your modelview and projection matrices, colours, and lighting.

There are two versions:

  • My original simple Linux C version based on a single include file frames.h.
  • A Linux / Windows version in C++ developed by Wojciech Jozefowicz, using cross-platform timer code by Lev Povalahev. All the code you need is in this zip.

Home