fix lightmap corruption

This commit is contained in:
Ivan Avdeev 2021-02-06 13:51:23 -08:00
parent 45ad261129
commit 2704f442e9
2 changed files with 7 additions and 3 deletions

View File

@ -7,14 +7,14 @@
- [x] shaders s/map/brush/
- [x] pipeline cache
- [x] swapchain getting stale
- [ ] sprites
- [x] HUD sprites
- [x] HUD sprites
- [x] issue: lightmap sometimes gets corrupted on map load
# Next
- [ ] studio models
# Planned
- [ ] issue: lightmap sometimes gets corrupted on map load
- [ ] sprites
- [ ] what is GL_Backend*/GL_RenderFrame ???
- [ ] beams
- [ ] particles

View File

@ -21,6 +21,8 @@ typedef struct
} gllightmapstate_t;
static gllightmapstate_t gl_lms;
// TODO this doesn't really need to be this huge
static uint r_blocklights[BLOCK_SIZE_MAX*BLOCK_SIZE_MAX*3]; // This is just a temp HDR-ish buffer for lightmap generation
static void LM_InitBlock( void )
@ -227,6 +229,8 @@ void VK_ClearLightmap( void )
for (int i = 0; i < gl_lms.current_lightmap_texture; ++i)
VK_FreeTexture(tglob.lightmapTextures[i]);
gl_lms.current_lightmap_texture = 0;
LM_InitBlock();
}
void VK_RunLightStyles( void )