Clear out the lightmap scrap at each level change.

This allows the demo loop to run more than 4 times (12 demos). Once the
rest of the resource management is done, demos should run indefinitely.
This commit is contained in:
Bill Currie 2012-01-17 13:02:15 +09:00
parent fc43e5a307
commit 42bb10a3d7

View file

@ -197,6 +197,9 @@ R_BuildLightmaps (model_t **models, int num_models)
if (!light_scrap) {
light_scrap = GL_CreateScrap (2048, GL_LUMINANCE);
light_data = malloc (BLOCK_SIZE * MAX_LIGHTMAPS);
} else {
GL_ScrapClear (light_scrap);
memset (light_data, 0, BLOCK_SIZE * MAX_LIGHTMAPS);
}
R_BuildLightMap = R_BuildLightMap_1;