Added FPS counter

This commit is contained in:
OM 2023-05-19 20:52:10 +02:00
parent 7fb383c810
commit cf51e14cf5
8 changed files with 109 additions and 383 deletions

View file

@ -42,6 +42,16 @@ R_PerformanceCounters
=====================
*/
void R_PerformanceCounters( void ) {
if (fps->integer) {
ri.SetPerformanceCounters(
backEnd.pc.c_totalIndexes / 3,
backEnd.pc.c_vertexes,
R_SumOfUsedImages(pc_save.c_totalIndexes / 3, pc_save.c_vertexes),
pc_save.c_totalIndexes / 3,
pc_save.c_vertexes,
backEnd.pc.c_characterlights
);
}
if ( !r_speeds->integer ) {
// clear the counters even if we aren't printing
Com_Memset( &tr.pc, 0, sizeof( tr.pc ) );