diff options
author | chai <chaifix@163.com> | 2018-12-24 08:15:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-24 08:15:13 +0800 |
commit | 6e64f600b662bbf5dd6cb63661504b67b60cddcd (patch) | |
tree | 23d4a4f7e5e837715af63d9077e51373b0abc188 /src/libjin/graphics/je_gl.h | |
parent | 145e0752c702fa354fb78d3f30fa4b8ec44bfe7b (diff) |
*stats
Diffstat (limited to 'src/libjin/graphics/je_gl.h')
-rw-r--r-- | src/libjin/graphics/je_gl.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libjin/graphics/je_gl.h b/src/libjin/graphics/je_gl.h index 37dc890..21aa900 100644 --- a/src/libjin/graphics/je_gl.h +++ b/src/libjin/graphics/je_gl.h @@ -38,6 +38,19 @@ namespace JinEngine PREMULTIPLIEDALPHA, }; + struct Stats + { + int drawCalls; + //int drawCallsBatched; + int canvasSwitches; + int shaderSwitches; + int fontSwitches; + int textures; + int canvases; + int fonts; + //int64 textureMemory; + }; + OpenGL(); ~OpenGL(); @@ -185,6 +198,16 @@ namespace JinEngine /// BlendMode getBlendMode(); + /// + /// + /// + void resetStats(); + + /// + /// + /// + Stats& getStats(); + private: static const Canvas* const DEFAULT_CANVAS; @@ -229,6 +252,11 @@ namespace JinEngine /// Fonts::Font* mFont; + /// + /// + /// + Stats mStats; + }; // Singleton. |