surfaces to become visible
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9769
d7cf8633-e32d-0410-b094-
e92efae38249
r_surfacelist[numsurfacelist++] = surfaces + j;
}
// update lightmaps if needed
r_surfacelist[numsurfacelist++] = surfaces + j;
}
// update lightmaps if needed
+ if (model->brushq1.firstrender)
+ {
+ model->brushq1.firstrender = false;
+ for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
+ if (update[j])
+ R_BuildLightMap(r_refdef.scene.worldentity, surfaces + j);
+ }
+ else if (update)
for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
if (r_refdef.viewcache.world_surfacevisible[j])
if (r_refdef.viewcache.world_surfacevisible[j])
R_BuildLightMap(r_refdef.scene.worldentity, surfaces + j);
R_BuildLightMap(r_refdef.scene.worldentity, surfaces + j);
}
// don't do anything if there were no surfaces
if (!numsurfacelist)
}
// don't do anything if there were no surfaces
if (!numsurfacelist)
loadmodel->num_surfaces = count;
loadmodel->num_surfaces = count;
+ loadmodel->brushq1.firstrender = true;
loadmodel->brushq1.lightmapupdateflags = (unsigned char *)Mem_Alloc(loadmodel->mempool, count*sizeof(unsigned char));
totalverts = 0;
loadmodel->brushq1.lightmapupdateflags = (unsigned char *)Mem_Alloc(loadmodel->mempool, count*sizeof(unsigned char));
totalverts = 0;
// this contains bytes that are 1 if a surface needs its lightmap rebuilt
unsigned char *lightmapupdateflags;
// this contains bytes that are 1 if a surface needs its lightmap rebuilt
unsigned char *lightmapupdateflags;
+ qboolean firstrender; // causes all surface lightmaps to be loaded in first frame