From cb0d141132642cd4b73c315cacbce083a40cc0ce Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Sat, 30 Sep 2000 02:46:48 +0000 Subject: [PATCH] GL rendering path audit. --- source/gl_rlight.c | 2 +- source/gl_rmain.c | 4 --- source/gl_screen.c | 68 +++------------------------------------------- source/sbar.c | 12 -------- source/screen.c | 10 +------ 5 files changed, 6 insertions(+), 90 deletions(-) diff --git a/source/gl_rlight.c b/source/gl_rlight.c index 61d9eaa..4553ba8 100644 --- a/source/gl_rlight.c +++ b/source/gl_rlight.c @@ -297,7 +297,7 @@ void R_PushDlights (vec3_t entorigin) dlight_t *l; vec3_t lightorigin; - if (gl_flashblend->value) + if (gl_flashblend->int_val) return; r_dlightframecount = r_framecount + 1; // because the count hasn't diff --git a/source/gl_rmain.c b/source/gl_rmain.c index d92152a..081a432 100644 --- a/source/gl_rmain.c +++ b/source/gl_rmain.c @@ -46,8 +46,6 @@ entity_t r_worldentity; -qboolean r_cache_thrash; // compatability - vec3_t modelorg, r_entorigin; entity_t *currententity; @@ -822,8 +820,6 @@ static void R_SetupFrame (void) V_SetContentsColor (r_viewleaf->contents); V_CalcBlend (); - r_cache_thrash = false; - c_brush_polys = 0; c_alias_polys = 0; diff --git a/source/gl_screen.c b/source/gl_screen.c index 10e43a7..afe44ba 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -151,7 +151,6 @@ viddef_t vid; // global video state vrect_t scr_vrect; qboolean scr_disabled_for_loading; -qboolean scr_drawloading; float scr_disabled_time; qboolean block_drawing; @@ -441,22 +440,6 @@ SCR_Init (void) -/* -============== -SCR_DrawRam -============== -*/ -void SCR_DrawRam (void) -{ - if (!scr_showram->value) - return; - - if (!r_cache_thrash) - return; - - Draw_Pic (scr_vrect.x+32, scr_vrect.y, scr_ram); -} - /* ============== SCR_DrawTurtle @@ -544,27 +527,6 @@ void SCR_DrawPause (void) (vid.height - 48 - pic->height)/2, pic); } - - -/* -============== -SCR_DrawLoading -============== -*/ -void SCR_DrawLoading (void) -{ - qpic_t *pic; - - if (!scr_drawloading) - return; - - pic = Draw_CachePic ("gfx/loading.lmp"); - Draw_Pic ( (vid.width - pic->width)/2, - (vid.height - 48 - pic->height)/2, pic); -} - - - //============================================================================= @@ -577,9 +539,6 @@ void SCR_SetUpToDrawConsole (void) { Con_CheckResize (); - if (scr_drawloading) - return; // never a console with loading plaque - // decide on the height of the console if (cls.state != ca_active) { @@ -985,7 +944,6 @@ void SCR_RSShot_f (void) //============================================================================= char *scr_notifystring; -qboolean scr_drawdialog; void SCR_DrawNotifyString (void) { @@ -1146,33 +1104,15 @@ void SCR_UpdateScreen (void) if (r_netgraph->value) R_NetGraph (); - if (scr_drawdialog) - { - Sbar_Draw (); - Draw_FadeScreen (); - SCR_DrawNotifyString (); - scr_copyeverything = true; - } - else if (scr_drawloading) - { - SCR_DrawLoading (); - Sbar_Draw (); - } - else if (cl.intermission == 1 && key_dest == key_game) - { + if (cl.intermission == 1 && key_dest == key_game) { Sbar_IntermissionOverlay (); - } - else if (cl.intermission == 2 && key_dest == key_game) - { + } else if (cl.intermission == 2 && key_dest == key_game) { Sbar_FinaleOverlay (); SCR_CheckDrawCenterString (); - } - else - { - if (crosshair->value) + } else { + if (crosshair->int_val) Draw_Crosshair(); - SCR_DrawRam (); SCR_DrawNet (); SCR_DrawFPS (); SCR_DrawTurtle (); diff --git a/source/sbar.c b/source/sbar.c index e5d36f8..2cfed28 100644 --- a/source/sbar.c +++ b/source/sbar.c @@ -853,18 +853,6 @@ void Sbar_Draw (void) if (sb_showscores || sb_showteamscores || cl.stats[STAT_HEALTH] <= 0) sb_updates = 0; - // clear unused areas in gl -#if 0 - { - int x = (vid.width - 320)>>1; - - // left - if (x > 0) { - Draw_TileClear (0, vid.height - sb_lines, x, sb_lines); - Draw_TileClear (x+320, vid.height - sb_lines, vid.width - x+320, sb_lines); - } - } -#endif if (vid.width > 320 && !headsup) Draw_TileClear (320, vid.height - sb_lines, vid.width - 320, sb_lines); diff --git a/source/screen.c b/source/screen.c index 905adb1..7c3c12b 100644 --- a/source/screen.c +++ b/source/screen.c @@ -930,7 +930,6 @@ void SCR_RSShot_f (void) //============================================================================= char *scr_notifystring; -qboolean scr_drawdialog; void SCR_DrawNotifyString (void) { @@ -1064,14 +1063,7 @@ void SCR_UpdateScreen (void) D_EnableBackBufferAccess (); // of all overlay stuff if drawing directly - if (scr_drawdialog) - { - Sbar_Draw (); - Draw_FadeScreen (); - SCR_DrawNotifyString (); - scr_copyeverything = true; - } - else if (cl.intermission == 1 && key_dest == key_game) + if (cl.intermission == 1 && key_dest == key_game) { Sbar_IntermissionOverlay (); }