]> git.tdb.fi Git - libs/gl.git/commitdiff
Set the rendered flag before doing anything else
authorMikko Rasa <tdb@tdb.fi>
Sat, 1 Nov 2014 00:39:06 +0000 (02:39 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 1 Nov 2014 00:39:06 +0000 (02:39 +0200)
Prevents recursion back into ShadowMap::setup_frame from the rendereable.

source/shadowmap.cpp

index dd689935055093c5b5652b9e0c7a216099265bfd..372fa1130c6ccf8836992b154cbb3ea9dbb31f95 100644 (file)
@@ -61,8 +61,8 @@ void ShadowMap::setup_frame() const
        if(rendered)
                return;
 
-       renderable.setup_frame();
        rendered = true;
+       renderable.setup_frame();
 
        const Vector4 &lpos = light.get_position();
        Vector3 back;