]> git.tdb.fi Git - libs/gl.git/commitdiff
Actually update the shdata generation numbers in Renderer
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Apr 2021 10:27:11 +0000 (13:27 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Apr 2021 10:27:11 +0000 (13:27 +0300)
source/render/renderer.cpp
source/render/renderer.h

index 8e8e215f4237fe48444b3a98e257c1d331413e7d..dc41eb11e746dc170b61d93897df58b98bd66c68 100644 (file)
@@ -398,7 +398,10 @@ void Renderer::apply_state()
                if(extra_shdata)
                        shdata_stack.erase(shdata_stack.begin()+state->shdata_count, shdata_stack.end());
                for(vector<BoundProgramData>::const_iterator i=shdata_stack.begin(); i!=shdata_stack.end(); ++i)
+               {
                        i->shdata->apply();
+                       i->generation = i->shdata->get_generation();
+               }
                changed &= ~SHADER_DATA;
        }
 
index 89f111221c0ce2d482363956e18f3578331a72a0..1a84d8bf8507c50d596bc3d1490a289f8c2f5855 100644 (file)
@@ -78,7 +78,7 @@ private:
        struct BoundProgramData
        {
                const ProgramData *shdata;
-               unsigned generation;
+               mutable unsigned generation;
 
                BoundProgramData(const ProgramData *);
        };