love.graphics.getStats

Available since LÖVE 0.9.2
This function is not supported in earlier versions.

Gets performance-related rendering statistics.

Function

Synopsis

stats = love.graphics.getStats( )

Arguments

None.

Returns

table stats
A table with the following fields:
number drawcalls
The number of draw calls made so far during the current frame. This includes all internal draw calls – for example, drawing smooth lines takes two draw calls.
number canvasswitches
The number of times the active Canvas has been switched so far during the current frame. This includes all internal canvas switches – for example, calling Canvas:clear if the Canvas isn't active will trigger two canvas switches.
number texturememory
The estimated total size in bytes of video memory used by all loaded Images, Canvases, and Fonts.
number images
The number of Image objects currently loaded.
number canvases
The number of Canvas objects currently loaded.
number fonts
The number of Font objects currently loaded.

See Also


Other Languages