]> git.tdb.fi Git - libs/gl.git/commitdiff
Make ShadowMap's finish_frame run only once per frame
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 19:41:39 +0000 (22:41 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 19:41:39 +0000 (22:41 +0300)
source/effects/shadowmap.cpp

index 639a352562bc062768e4303b89505afccd65f757..488a3427360eeea8fcf7921209632f64cdb8a453 100644 (file)
@@ -100,8 +100,11 @@ void ShadowMap::setup_frame(Renderer &renderer)
 
 void ShadowMap::finish_frame()
 {
-       renderable.finish_frame();
-       rendered = false;
+       if(rendered)
+       {
+               rendered = false;
+               renderable.finish_frame();
+       }
 }
 
 void ShadowMap::render(Renderer &renderer, Tag tag) const