speed up R_RenderBrushPoly ever so slightly

This commit is contained in:
Bill Currie 2000-07-04 07:04:46 +00:00
parent 1dd7a8be0d
commit d24e28f28b

View file

@ -750,8 +750,13 @@ dynamic:
theRect->w = (fa->light_s-theRect->l)+smax;
if ((theRect->h + theRect->t) < (fa->light_t + tmax))
theRect->h = (fa->light_t-theRect->t)+tmax;
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * lightmap_bytes;
R_BuildLightMap (fa, base, BLOCK_WIDTH*lightmap_bytes);
if (lightmap_bytes==3) {
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * 3;
R_BuildLightMap (fa, base, BLOCK_WIDTH*3);
} else {
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s);
R_BuildLightMap (fa, base, BLOCK_WIDTH);
}
}
}
}
@ -807,8 +812,13 @@ dynamic:
theRect->w = (fa->light_s-theRect->l)+smax;
if ((theRect->h + theRect->t) < (fa->light_t + tmax))
theRect->h = (fa->light_t-theRect->t)+tmax;
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * lightmap_bytes;
R_BuildLightMap (fa, base, BLOCK_WIDTH*lightmap_bytes);
if (lightmap_bytes==3) {
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * 3;
R_BuildLightMap (fa, base, BLOCK_WIDTH*3);
} else {
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s);
R_BuildLightMap (fa, base, BLOCK_WIDTH);
}
}
}
}
@ -1454,8 +1464,13 @@ void GL_CreateSurfaceLightmap (msurface_t *surf)
tmax = (surf->extents[1]>>4)+1;
surf->lightmaptexturenum = AllocBlock (smax, tmax, &surf->light_s, &surf->light_t);
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s) * lightmap_bytes;
R_BuildLightMap (surf, base, BLOCK_WIDTH*lightmap_bytes);
if (lightmap_bytes==3) {
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s) * 3;
R_BuildLightMap (surf, base, BLOCK_WIDTH*3);
} else {
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s);
R_BuildLightMap (surf, base, BLOCK_WIDTH);
}
}