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:
Sasha Szpakowski
2023-12-25 23:25:46 +01:00
parent 9c6417776f
commit e42019c59e
5 changed files with 23 additions and 2 deletions
+3 -1
View File
@@ -2422,8 +2422,10 @@ Graphics::Stats Graphics::getStats() const
stats.drawCallsBatched = drawCallsBatched;
stats.textures = Texture::textureCount;
stats.fonts = Font::fontCount;
stats.buffers = Buffer::bufferCount;
stats.textureMemory = Texture::totalGraphicsMemory;
stats.bufferMemory = Buffer::totalGraphicsMemory;
return stats;
}