mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-23 02:41:30 +00:00
[gl] Draw sky chains before brush entities
Drawing sky chains first ensures that sky surfaces correctly block parts of the map that should not be visible (by writing the correct depth to the depth buffer when doing box or dome skies). Writing brush models first means that the models (ammo boxes etc) could be visible when they should not be.
This commit is contained in:
parent
71c1b4e0c4
commit
9514ad1ae4
1 changed files with 5 additions and 4 deletions
|
@ -739,6 +739,11 @@ gl_R_DrawWorld (void)
|
|||
bctx.entity = &r_worldentity;
|
||||
|
||||
R_VisitWorldNodes (&bctx);
|
||||
|
||||
gl_R_CalcLightmaps ();
|
||||
|
||||
gl_R_DrawSkyChain (sky_chain);
|
||||
|
||||
if (r_drawentities->int_val) {
|
||||
for (size_t i = 0; i < r_ent_queue->ent_queues[mod_brush].size; i++) { \
|
||||
entity_t *ent = r_ent_queue->ent_queues[mod_brush].a[i]; \
|
||||
|
@ -746,10 +751,6 @@ gl_R_DrawWorld (void)
|
|||
}
|
||||
}
|
||||
|
||||
gl_R_CalcLightmaps ();
|
||||
|
||||
gl_R_DrawSkyChain (sky_chain);
|
||||
|
||||
if (!gl_Fog_GetDensity ()
|
||||
|| (gl_fb_bmodels->int_val && gl_mtex_fullbright)
|
||||
|| gl_mtex_active_tmus > 1) {
|
||||
|
|
Loading…
Reference in a new issue