Leviathan  0.8.0.0
Leviathan game engine
RenderingStatistics.h
Go to the documentation of this file.
1 #pragma once
2 // ------------------------------------ //
3 #include "Include.h"
4 #include "../ForwardDeclarations.h"
5 #include <vector>
6 #include <cstddef>
7 
8 namespace Leviathan{
9 
12  public:
15 
17  DLLEXPORT void RenderingEnd();
18 
19  DLLEXPORT bool CanRenderNow(int maxfps, int& TimeSinceLastFrame);
20 
21  DLLEXPORT void ReportStats(DataStore* dstore);
22 
23  private:
24 
25 
26  void HalfMinuteMark();
27  void SecondMark();
28 
29  static void MakeSureHasEnoughRoom(std::vector<int> &tarvec, const size_t &accessspot);
30 
31  // ------------------------------------ //
32  int64_t HalfMinuteStartTime;
33  int64_t SecondStartTime;
34  int64_t RenderingStartTime;
35  int64_t RenderingEndTime;
36  // measured values //
37  int Frames;
38 
39  int FPS;
40  int RenderMCRSeconds;
41 
42  int MinFPS;
43  int MaxFPS;
44  int AverageFps;
45 
46  int MaxFrameTime;
47  int MinFrameTime;
48  int AverageRenderTime;
49 
50  int DoubtfulCancel;
51 
52  bool IsFirstFrame;
53 
54  // stored values //
55  std::vector<int> LastMinuteFPS;
56  size_t LastMinuteFPSPos;
57 
58  std::vector<int> LastMinuteRenderTimes;
59  size_t LastMinuteRenderTimesPos;
60 
61 
62  bool EraseOld;
63 
64 
65 
66  };
67 
68 }
69 
#define DLLEXPORT
Definition: Include.h:84
DLLEXPORT void ReportStats(DataStore *dstore)
DLLEXPORT bool CanRenderNow(int maxfps, int &TimeSinceLastFrame)
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12