From 4427529e51894080cb6981a6a52570849663a32b Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 22 Jul 2020 23:03:10 +0200 Subject: [PATCH] Client: Put renderscene() into its own function to make profiling easier. --- src/client/entry.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/client/entry.c b/src/client/entry.c index 93ac6fe0..52315d17 100644 --- a/src/client/entry.c +++ b/src/client/entry.c @@ -115,6 +115,14 @@ CSQC_RendererRestarted(string rstr) FX_Init(); } +/* this is so that profile_csqc reports more accurate statistics as to + what causes computation time */ +void +CSQC_RenderScene(void) +{ + renderscene(); +} + void CSQC_UpdateView(float w, float h, float focus) { @@ -299,10 +307,10 @@ CSQC_UpdateView(float w, float h, float focus) setproperty(VF_AFOV, autocvar_r_viewmodelfov); setproperty(VF_ORIGIN, pSeat->m_vecPredictedOrigin + pl.view_ofs); View_DrawViewModel(); - renderscene(); + CSQC_RenderScene(); } else { View_DrawViewModel(); - renderscene(); + CSQC_RenderScene(); } for (entity b = world; (b = findfloat(b, ::isCSQC, 1));) {