summaryrefslogtreecommitdiff
path: root/Runtime/Profiling/FrameStats.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Profiling/FrameStats.h')
-rw-r--r--Runtime/Profiling/FrameStats.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Runtime/Profiling/FrameStats.h b/Runtime/Profiling/FrameStats.h
new file mode 100644
index 0000000..b3073d5
--- /dev/null
+++ b/Runtime/Profiling/FrameStats.h
@@ -0,0 +1,29 @@
+#ifndef FRAME_STATS_H
+#define FRAME_STATS_H
+
+#include "../Utilities/Singleton.h"
+#include "../Utilities/UtilMacros.h"
+#include "../Utilities/Type.h"
+
+class FrameStats : public Singleton<FrameStats>
+{
+public:
+ void OnBeginFrame();
+ void OnEndFrame();
+
+ void AddDrawCall(uint n = 1);
+ void AddTrianglesCount(uint n = 1);
+
+ GET(uint, DrawCall, m_DrawCall);
+ GET(uint, TrianglesCount, m_TrianglesCount);
+
+private:
+
+ uint m_DrawCall;
+ uint m_TrianglesCount;
+
+};
+
+#define g_FrameStats (*FrameStats::Instance())
+
+#endif \ No newline at end of file