wglgears: add srgb-mode to usage
[mesa-demos.git] / src / wgl / rtotex / fps_counter.h
blobc9114f89c849c51bd2befb9a7c9fa307b9704c22
1 //////////////////////////////////////////////////////////////////////////////////////////
2 // FPS_COUNTER.h
3 // class to calculate frames per second
4 // Downloaded from: www.paulsprojects.net
5 // Created: 20th July 2002
6 //
7 // Copyright (c) 2006, Paul Baker
8 // Distributed under the New BSD Licence. (See accompanying file License.txt or copy at
9 // http://www.paulsprojects.net/NewBSDLicense.txt)
10 //////////////////////////////////////////////////////////////////////////////////////////
12 #ifndef FPS_COUNTER_H
13 #define FPS_COUNTER_H
15 class FPS_COUNTER
17 public:
18 void Update(void); //updates counter - call once per frame
19 void Shutdown(void); //send max, min, average to log
20 float GetFps(void) { return fps; }
22 FPS_COUNTER() : fps(0.0f), lastTime(0.0f), frames(0L), time(0.0f)
24 ~FPS_COUNTER() {}
26 protected:
27 float fps;
29 float lastTime;
30 long frames;
31 float time;
34 #endif //FPS_COUNTER_H