mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Added love.graphics.getStats. It returns a table with performance-related graphics statistics. Currently it contains these fields:
drawcalls: The number of internal draw calls made so far in the current frame. canvasswitches: The number of times the active Canvas has been changed so far in the current frame. texturememory: The approximate amount of video memory (in bytes) used by OpenGL textures created by Images, Canvases, and Fonts. images: The number of active Image objects. canvases: The number of active Canvas objects. fonts: The number of active Font objects.
This commit is contained in:
@@ -138,6 +138,8 @@ public:
|
||||
bool hasGlyph(uint32 glyph) const;
|
||||
bool hasGlyphs(const std::string &text) const;
|
||||
|
||||
static int fontCount;
|
||||
|
||||
private:
|
||||
|
||||
enum FontType
|
||||
@@ -207,6 +209,8 @@ private:
|
||||
|
||||
bool useSpacesAsTab;
|
||||
|
||||
size_t textureMemorySize;
|
||||
|
||||
static const int NUM_TEXTURE_SIZES = 7;
|
||||
static const int TEXTURE_WIDTHS[NUM_TEXTURE_SIZES];
|
||||
static const int TEXTURE_HEIGHTS[NUM_TEXTURE_SIZES];
|
||||
|
||||
Reference in New Issue
Block a user