diff options
author | Andrey Nazarov <skuller@skuller.net> | 2011-03-08 19:23:20 +0300 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2011-03-08 19:23:20 +0300 |
commit | ccbfc0b09375a932aa64aea706d059b115328da9 (patch) | |
tree | b13ed590da91ed11544bcb3af65c1648010dba03 /src | |
parent | d1db2c0bf4c25a14015f13fd87143799c9620aa6 (diff) |
Report number of nodes/leaves drawn in GL stats.
Diffstat (limited to 'src')
-rw-r--r-- | src/gl_draw.c | 2 | ||||
-rw-r--r-- | src/gl_local.h | 1 | ||||
-rw-r--r-- | src/gl_world.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/gl_draw.c b/src/gl_draw.c index c7a7a80..7117413 100644 --- a/src/gl_draw.c +++ b/src/gl_draw.c @@ -318,6 +318,8 @@ void Draw_Stats( void ) { Draw_Stringf( x, y, "Nodes visible : %i", c.nodesVisible ); y += 10; Draw_Stringf( x, y, "Nodes culled : %i", c.nodesCulled ); y += 10; + Draw_Stringf( x, y, "Nodes drawn : %i", c.nodesDrawn ); y += 10; + Draw_Stringf( x, y, "Leaves drawn : %i", c.leavesDrawn ); y += 10; Draw_Stringf( x, y, "Faces drawn : %i", c.facesDrawn ); y += 10; if( c.facesCulled ) { Draw_Stringf( x, y, "Faces culled : %i", c.facesCulled ); y += 10; diff --git a/src/gl_local.h b/src/gl_local.h index 610ba34..339cfe5 100644 --- a/src/gl_local.h +++ b/src/gl_local.h @@ -85,6 +85,7 @@ extern glRefdef_t glr; typedef struct { int nodesVisible; int nodesDrawn; + int leavesDrawn; int facesMarked; int facesDrawn; int texSwitches; diff --git a/src/gl_world.c b/src/gl_world.c index 0c08153..492d7a3 100644 --- a/src/gl_world.c +++ b/src/gl_world.c @@ -432,6 +432,8 @@ static inline void GL_DrawLeaf( mleaf_t *leaf ) { for( face = leaf->firstleafface; face < last; face++ ) { (*face)->drawframe = glr.drawframe; } + + c.leavesDrawn++; } static inline void GL_AddGenericFace( mface_t *face ) { |