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 /bin | |
parent | 145e0752c702fa354fb78d3f30fa4b8ec44bfe7b (diff) |
*stats
Diffstat (limited to 'bin')
-rw-r--r-- | bin/game/main.lua | 9 | ||||
-rw-r--r-- | bin/jin.exe | bin | 561152 -> 562176 bytes |
2 files changed, 9 insertions, 0 deletions
diff --git a/bin/game/main.lua b/bin/game/main.lua index 8128bb6..e45958f 100644 --- a/bin/game/main.lua +++ b/bin/game/main.lua @@ -108,6 +108,8 @@ function jin.core.onLoad() timer:every(1, function() jin.log.info(jin.time.getFPS() .. " fps") + local stats = jin.graphics.getStats() + jin.log.info("textures " .. stats.textures) end) --local xmlParser = jin.utils.xml.newParser() @@ -157,4 +159,11 @@ function jin.core.onDraw() jin.graphics.useShader(sinShader) jin.graphics.rect(jin.graphics.RenderMode.FILL, 300, 300, 100, 50) jin.graphics.unuseShader() + + local stats = jin.graphics.getStats() + jin.graphics.print("draw call: " .. stats.drawCalls, 450, 10) + jin.graphics.print("canvas switches: " .. stats.canvasSwitches, 450, 30) + jin.graphics.print("shader switches: " .. stats.shaderSwitches, 450, 50) + jin.graphics.print("font switches: " .. stats.fontSwitches, 450, 70) + end
\ No newline at end of file diff --git a/bin/jin.exe b/bin/jin.exe Binary files differindex 39b358d..57e2152 100644 --- a/bin/jin.exe +++ b/bin/jin.exe |