~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to source/Irrlicht/CFPSCounter.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
 
2
// This file is part of the "Irrlicht Engine".
 
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
 
4
 
 
5
#ifndef __C_FPSCOUNTER_H_INCLUDED__
 
6
#define __C_FPSCOUNTER_H_INCLUDED__
 
7
 
 
8
#include "irrTypes.h"
 
9
 
 
10
namespace irr
 
11
{
 
12
namespace video  
 
13
{
 
14
 
 
15
 
 
16
class CFPSCounter  
 
17
{
 
18
public:
 
19
        CFPSCounter();
 
20
 
 
21
        //! returns current fps
 
22
        s32 getFPS() const;
 
23
 
 
24
        //! returns primitive count
 
25
        u32 getPrimitive() const;
 
26
 
 
27
        //! returns average primitive count of last period
 
28
        u32 getPrimitiveAverage() const;
 
29
 
 
30
        //! returns accumulated primitive count since start
 
31
        u32 getPrimitiveTotal() const;
 
32
 
 
33
        //! to be called every frame
 
34
        void registerFrame(u32 now, u32 primitive);
 
35
 
 
36
private:
 
37
 
 
38
        s32 FPS;
 
39
        u32 Primitive;
 
40
        u32 StartTime;
 
41
 
 
42
        u32 FramesCounted;
 
43
        u32 PrimitivesCounted;
 
44
        u32 PrimitiveAverage;
 
45
        u32 PrimitiveTotal;
 
46
};
 
47
 
 
48
 
 
49
} // end namespace video
 
50
} // end namespace irr
 
51
 
 
52
 
 
53
#endif 
 
54