diff options
author | chai <chaifix@163.com> | 2018-12-24 19:15:02 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-24 19:15:02 +0800 |
commit | 039e2541207232e0a382a52a65122a15eed9257d (patch) | |
tree | ab378128b2c0b4f228e3312595d8b91bfa30cd63 /src/libjin-lua/scripts/graphics/graphics.lua | |
parent | 913e41baa76cf6b866b85137c85b89be34b2376c (diff) |
+physics module
Diffstat (limited to 'src/libjin-lua/scripts/graphics/graphics.lua')
-rw-r--r-- | src/libjin-lua/scripts/graphics/graphics.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libjin-lua/scripts/graphics/graphics.lua b/src/libjin-lua/scripts/graphics/graphics.lua index 65a320f..423de74 100644 --- a/src/libjin-lua/scripts/graphics/graphics.lua +++ b/src/libjin-lua/scripts/graphics/graphics.lua @@ -160,3 +160,15 @@ jg.reset = function() jg.unsetFont() jg.unuseShader() end + +jg.getStatsStr = function() + local stats = jin.graphics.getStats() + local str = "draw call: " .. stats.drawCalls .. '\n' + .. "canvas switches: " .. stats.canvasSwitches .. '\n' + .. "shader switches: " .. stats.shaderSwitches .. '\n' + .. "font switches: " .. stats.fontSwitches .. '\n' + .. "textures: " .. stats.textures .. '\n' + .. "canvases: " .. stats.canvases .. '\n' + .. "fonts: " .. stats.fonts + return str +end
\ No newline at end of file |