diff options
| author | chai <chaifix@163.com> | 2020-10-19 09:13:58 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2020-10-19 09:13:58 +0800 | 
| commit | f0807fc44dde14531759306317611bab87c8fccf (patch) | |
| tree | 6e78fed61c16a70cda5fa732635f89f9faac9720 /Runtime/Profiler/FrameStats.h | |
| parent | 639b34294ffc20721c66db46e59e07d9100ac4b8 (diff) | |
+gamelab proj
Diffstat (limited to 'Runtime/Profiler/FrameStats.h')
| -rw-r--r-- | Runtime/Profiler/FrameStats.h | 29 | 
1 files changed, 29 insertions, 0 deletions
| diff --git a/Runtime/Profiler/FrameStats.h b/Runtime/Profiler/FrameStats.h new file mode 100644 index 0000000..b3073d5 --- /dev/null +++ b/Runtime/Profiler/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 | 
