-
Notifications
You must be signed in to change notification settings - Fork 0
/
Statistics.h
33 lines (27 loc) · 847 Bytes
/
Statistics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <string>
#include <glm\vec3.hpp>
#include "Data\RenderableSentence.h"
#include "Managers\FontManager.h"
#include "Utils\Vertex.h"
// Draws statistics information in a more fancier (and older) manner than using the GUI library.
// This information is drawn with the FontManager global font.
class Statistics
{
FontManager* fontManager;
// Stats data
int currentFrameCounter;
float totalElapsedTime;
glm::ivec2 lastSector;
int textPixelHeight;
// Overall Details
RenderableSentence fps;
RenderableSentence runTime;
RenderableSentence sector;
public:
Statistics();
bool Initialize(FontManager* fontManager);
void UpdateRunTime(float currentTime, float elapsedTime);
void UpateSector(const glm::ivec2& sector);
void RenderStats(glm::mat4& perspectiveMatrix);
};