From 1967972f6e5ba838f2e9ef3f67e0ebe300feffbb Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sat, 7 Oct 2017 23:15:24 +0900 Subject: Track LightInstance::shadow_atlases so that it will be freed properly --- drivers/gles3/rasterizer_scene_gles3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index eaf0b06664..4c9d0f181e 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -379,6 +379,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in sh->owner = p_light_intance; sh->alloc_tick = tick; sh->version = p_light_version; + li->shadow_atlases.insert(p_atlas); //make new key key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT; @@ -414,6 +415,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in sh->owner = p_light_intance; sh->alloc_tick = tick; sh->version = p_light_version; + li->shadow_atlases.insert(p_atlas); //make new key uint32_t key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT; -- cgit v1.2.3