mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[gl] Remove unnecessary light map update code
gl_overbright_f shouldn't need to run through any entity queues to update the light maps as only the world model has light maps, and hitting the world model should hit all its sub-models.
This commit is contained in:
parent
833fb2f4f8
commit
961e6d9e6c
1 changed files with 0 additions and 24 deletions
|
@ -529,7 +529,6 @@ void
|
||||||
gl_overbright_f (cvar_t *var)
|
gl_overbright_f (cvar_t *var)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
model_t *m;
|
|
||||||
mod_brush_t *brush;
|
mod_brush_t *brush;
|
||||||
|
|
||||||
if (!var)
|
if (!var)
|
||||||
|
@ -576,29 +575,6 @@ gl_overbright_f (cvar_t *var)
|
||||||
if (!gl_R_BuildLightMap)
|
if (!gl_R_BuildLightMap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
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]; \
|
|
||||||
m = ent->renderer.model;
|
|
||||||
if (m->path[0] == '*')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
brush = &m->brush;
|
|
||||||
for (unsigned j = 0; j < brush->numsurfaces; j++) {
|
|
||||||
msurface_t *surf = brush->surfaces + j;
|
|
||||||
if (surf->flags & (SURF_DRAWTURB | SURF_DRAWSKY))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
num = surf->lightmaptexturenum;
|
|
||||||
gl_lightmap_modified[num] = true;
|
|
||||||
gl_lightmap_rectchange[num].l = 0;
|
|
||||||
gl_lightmap_rectchange[num].t = 0;
|
|
||||||
gl_lightmap_rectchange[num].w = BLOCK_WIDTH;
|
|
||||||
gl_lightmap_rectchange[num].h = BLOCK_HEIGHT;
|
|
||||||
|
|
||||||
gl_R_BuildLightMap (0, brush, surf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
brush = &r_refdef.worldmodel->brush;
|
brush = &r_refdef.worldmodel->brush;
|
||||||
|
|
||||||
for (unsigned i = 0; i < brush->numsurfaces; i++) {
|
for (unsigned i = 0; i < brush->numsurfaces; i++) {
|
||||||
|
|
Loading…
Reference in a new issue