mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Add buffer stats to love.graphics.getStats.
- Add 'buffers' field, to count the total number of graphics buffer objects. - Add 'buffermemory' field, to estimate the total number of bytes of graphics memory used by all buffers.
This commit is contained in:
@@ -3005,9 +3005,15 @@ int w_getStats(lua_State *L)
|
||||
lua_pushinteger(L, stats.fonts);
|
||||
lua_setfield(L, -2, "fonts");
|
||||
|
||||
lua_pushinteger(L, stats.textureMemory);
|
||||
lua_pushinteger(L, stats.buffers);
|
||||
lua_setfield(L, -2, "buffers");
|
||||
|
||||
lua_pushnumber(L, (lua_Number) stats.textureMemory);
|
||||
lua_setfield(L, -2, "texturememory");
|
||||
|
||||
lua_pushnumber(L, (lua_Number) stats.bufferMemory);
|
||||
lua_setfield(L, -2, "buffermemory");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user