playback_numprims.pl
来自「hl2 source code. Do not use it illegal.」· PL 代码 · 共 28 行
PL
28 行
if( scalar( @ARGV ) != 1 )
{
die "Usage: playback_numprims.pl frame.txt\n";
}
open INPUT, shift || die;
$numprims = 0;
$numcalls = 0;
while( <INPUT> )
{
if( /DrawIndexedPrimitive.*numPrimitives:\s*(\d+)\s*$/i )
{
$numprims += $1;
if( $1 > 85 )
{
$numfreeprims += $1;
}
else
{
$numfreeprims += 85;
}
$numcalls++;
}
}
close INPUT;
print "$numprims primitives\n";
print "$numfreeprims freeprimitives\n";
print "$numcalls calls\n";
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?