summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2018-09-26 21:49:24 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2018-09-26 21:52:41 +0200
commitb8bd5d0354b441194484638b1027df426e0d7679 (patch)
treedbe12cad0c0349f3ebcfb294af9f7f72ea6fb59f /drivers
parenta2b6be23ada5e7dc6f5815236d7d2b3bb41ab2db (diff)
Update lights when their reverse cull face mode is toggled
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp3
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index adf07c2e4f..1a71a118fa 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -3162,6 +3162,9 @@ void RasterizerStorageGLES2::light_set_reverse_cull_face_mode(RID p_light, bool
ERR_FAIL_COND(!light);
light->reverse_cull = p_enabled;
+
+ light->version++;
+ light->instance_change_notify();
}
void RasterizerStorageGLES2::light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode) {
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 25e7bd0424..ef14a4732d 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -5014,6 +5014,9 @@ void RasterizerStorageGLES3::light_set_reverse_cull_face_mode(RID p_light, bool
ERR_FAIL_COND(!light);
light->reverse_cull = p_enabled;
+
+ light->version++;
+ light->instance_change_notify();
}
void RasterizerStorageGLES3::light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode) {