On-screen Profiler / Debug visualizations in progress

Added on-screen FPS counter.
This commit is contained in:
2013-03-22 17:17:12 -07:00
parent a23b39a178
commit b34d90f41d
7 changed files with 104 additions and 15 deletions

View File

@@ -44,6 +44,8 @@
#include "KRViewport.h"
#include "KRRenderSettings.h"
#define KRAKEN_FPS_AVERAGE_FRAME_COUNT 30
class KRModel;
class KRScene;
class KRViewport;
@@ -79,6 +81,7 @@ private:
float m_particlesAbsoluteTime;
typedef struct {
GLfloat x;
GLfloat y;
@@ -90,6 +93,10 @@ private:
DebugTextVertexData *m_debug_text_vertices;
std::string getDebugText();
uint64_t m_last_frame_start;
int m_frame_times[KRAKEN_FPS_AVERAGE_FRAME_COUNT];
int m_frame_times_filled;
};
#endif