engine/EngineVideoTextureManager.c
/*	Report texture memory usage for this frame
*/
Report texture memory usage for this frame
Report texture memory usage for this frame
float TexMgr_FrameUsage (void)
{
	float mb;
	float texels = 0;
	gltexture_t	*glt;
	for (glt=active_gltextures; glt; glt=glt->next)
		if (glt->visframe == r_framecount)
		{
			if (glt->flags & TEXPREF_MIPMAP)
				texels += glt->width*glt->height*4.0f/3.0f;
			else
				texels += (glt->width*glt->height);
		}
	mb = texels*(Video.bpp / 8.0f) / 0x100000;
	return mb;
}
float TexMgr_FrameUsage ( void ) { float mb ; float texels = 0 ; gltexture_t * glt ; for ( glt = active_gltextures ; glt ; glt = glt -> next ) if ( glt -> visframe == r_framecount ) { if ( glt -> flags & TEXPREF_MIPMAP ) texels += glt -> width * glt -> height * 4.0f / 3.0f ; else texels += ( glt -> width * glt -> height ) ; } mb = texels * ( Video . bpp / 8.0f ) / 0x100000 ; return mb ; }
Report texture memory usage for this frame
Report texture memory usage for this frame