[renderer] Make draw order a little more consistent

GL and GLSL were drawing the view model after particles instead of
before. For GL, this is likely due to avoiding fog affecting the view
model (which I think is not the right thing to do), and GLSL due to
copying GL (because I had no idea at the time). This makes the two
renderers consistent with the software renderers, and might even speed
things up a little as that's one less set of blends to do when the
particles are covered by the view model (I don't expect much
difference).
This commit is contained in:
Bill Currie 2022-03-02 16:29:40 +09:00
parent ae6970a005
commit f296cb897e
2 changed files with 5 additions and 6 deletions

View file

@ -448,20 +448,19 @@ R_RenderScene (void)
gl_R_SetupFrame ();
R_SetupGL ();
gl_Fog_EnableGFog ();
R_MarkLeaves (); // done here so we know if we're in water
R_PushDlights (vec3_origin);
gl_R_DrawWorld (); // adds static entities to the list
S_ExtraUpdate (); // don't let sound get messed up if going slow
R_DrawEntitiesOnList ();
gl_R_RenderDlights ();
gl_R_DrawWaterSurfaces ();
R_DrawViewModel ();
gl_R_DrawParticles ();
gl_Fog_DisableGFog ();
R_DrawViewModel ();
if (R_TestErrors (0))
R_DisplayErrors ();
R_ClearErrors ();

View file

@ -217,15 +217,15 @@ glsl_R_RenderView (void)
glsl_R_DrawWaterSurfaces ();
if (speeds)
t[7] = Sys_DoubleTime ();
glsl_R_DrawParticles ();
R_DrawViewModel ();
if (speeds)
t[8] = Sys_DoubleTime ();
R_DrawViewModel ();
glsl_R_DrawParticles ();
if (speeds)
t[9] = Sys_DoubleTime ();
if (speeds) {
Sys_Printf ("frame: %g, setup: %g, mark: %g, pushdl: %g, world: %g,"
" sky: %g, ents: %g, water: %g, part: %g, view: %g\n",
" sky: %g, ents: %g, water: %g, view: %g, part: %g\n",
(t[9] - t[0]) * 1000, (t[1] - t[0]) * 1000,
(t[2] - t[1]) * 1000, (t[3] - t[2]) * 1000,
(t[4] - t[3]) * 1000, (t[5] - t[4]) * 1000,