From: Mikko Rasa Date: Sat, 24 Apr 2021 19:41:39 +0000 (+0300) Subject: Make ShadowMap's finish_frame run only once per frame X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=18449fc11c620be7b3115f28a5edfb57eb5985ef;p=libs%2Fgl.git Make ShadowMap's finish_frame run only once per frame --- diff --git a/source/effects/shadowmap.cpp b/source/effects/shadowmap.cpp index 639a3525..488a3427 100644 --- a/source/effects/shadowmap.cpp +++ b/source/effects/shadowmap.cpp @@ -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