]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
got rid of Hunk_Alloc, all allocations now have a proper name (perhaps a bit too...
[xonotic/darkplaces.git] / gl_textures.c
index 952ea1f881c4deaf802281b4a961844eb8714b4b..e2b6aeaad7a9e8f72bde976a4a41aaf04d79ba63 100644 (file)
@@ -115,24 +115,36 @@ void GL_TextureStats_Print(char *name, int total, int crc, int mip, int alpha)
 
 void GL_TextureStats_f(void)
 {
-       int i, t = 0;
+       int i, s = 0, sc = 0, t = 0;
        gltexture_t *glt;
        Con_Printf("name                        kbytes crc  mip alpha\n");
        for (i = 0, glt = gltextures;i < numgltextures;i++, glt++)
        {
                GL_TextureStats_Print(glt->identifier, ((glt->totaltexels * 4) + 512) >> 10, glt->crc, glt->mipmap, glt->alpha);
                t += glt->totaltexels;
+               if (glt->identifier[0] == '&')
+               {
+                       sc++;
+                       s += glt->totaltexels;
+               }
        }
-       Con_Printf("%i textures, totalling %.3f mbytes\n", numgltextures, t / 1024.0 / 1024.0);
+       Con_Printf("%i textures, totalling %.3fMB, %i are (usually) unnecessary model skins totalling %.3fMB\n", numgltextures, t / 1048576.0, sc, s / 1048576.0);
 }
 
 void GL_TextureStats_PrintTotal(void)
 {
-       int i, t = 0;
+       int i, s = 0, sc = 0, t = 0;
        gltexture_t *glt;
        for (i = 0, glt = gltextures;i < numgltextures;i++, glt++)
+       {
                t += glt->totaltexels;
-       Con_Printf("%i textures, totalling %.3f mbytes\n", numgltextures, t / 1024.0 / 1024.0);
+               if (glt->identifier[0] == '&')
+               {
+                       sc++;
+                       s += glt->totaltexels;
+               }
+       }
+       Con_Printf("%i textures, totalling %.3fMB, %i are (usually) unnecessary model skins totalling %.3fMB\n", numgltextures, t / 1048576.0, sc, s / 1048576.0);
 }
 
 extern int buildnumber;