summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHiroshi Ogawa <hi.ogawa.zz@gmail.com>2017-10-07 23:15:24 +0900
committerHiroshi Ogawa <hi.ogawa.zz@gmail.com>2017-10-09 09:51:10 +0900
commit1967972f6e5ba838f2e9ef3f67e0ebe300feffbb (patch)
tree23805785d98e0a12833788664da2d8ac5a7b02f7 /drivers
parentdc6bb74c4638be6989dcb042895af9c75682f0c5 (diff)
Track LightInstance::shadow_atlases so that it will be freed properly
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp2
1 files changed, 2 insertions, 0 deletions
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;