*
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef FrameCounter_h__
|
||||
#define FrameCounter_h__
|
||||
|
||||
namespace LifeCore
|
||||
{
|
||||
class Timer;
|
||||
class FrameCounter
|
||||
{
|
||||
public:
|
||||
FrameCounter();
|
||||
~FrameCounter();
|
||||
int GetFrameId();
|
||||
float GetFps();
|
||||
float GetFpsAvg();
|
||||
float GetTimeElapled();
|
||||
float GetTimeElapsedAvg();
|
||||
void SetFrameRange(int range);
|
||||
void OnFrameEnd();
|
||||
private:
|
||||
float* prev_time;
|
||||
int buffer_pos;
|
||||
float fps;
|
||||
float avg_fps;
|
||||
float time_elapsed;
|
||||
float time_elapsed_avg;
|
||||
int frame_range;
|
||||
int frame_id;
|
||||
Timer* timer;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // FrameCounter_h__
|
||||
Reference in New Issue
Block a user