mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +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:
@@ -333,7 +333,7 @@ void Polyline::draw()
|
||||
gl.bindTexture(0);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *)vertices);
|
||||
glDrawArrays(draw_mode, 0, vertex_count);
|
||||
gl.drawArrays(draw_mode, 0, vertex_count);
|
||||
|
||||
if (overdraw)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ void Polyline::draw()
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
|
||||
glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *)overdraw);
|
||||
glDrawArrays(draw_mode, 0, overdraw_vertex_count);
|
||||
gl.drawArrays(draw_mode, 0, overdraw_vertex_count);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
delete[] colors;
|
||||
|
||||
Reference in New Issue
Block a user