]> git.tdb.fi Git - libs/gl.git/commitdiff
Deprecate external access to Renderer::flush_shader_data
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Aug 2021 22:52:31 +0000 (01:52 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Aug 2021 22:52:31 +0000 (01:52 +0300)
It's no longer needed since changes in ProgramData are tracked with a
generation number.

source/render/renderer.cpp
source/render/renderer.h

index 7389298a0ebe3c8db298ab72154a83d4aa949c7a..8de24adbbca8aee385a5ddab15941b50ee41b9e6 100644 (file)
@@ -182,13 +182,13 @@ void Renderer::add_shader_data(const ProgramData &d)
                }
        }
 
-       flush_shader_data();
+       flush_shader_data_();
        shdata_stack.push_back(&d);
        state->shdata_count = shdata_stack.size();
        changed |= SHADER_DATA;
 }
 
-void Renderer::flush_shader_data()
+void Renderer::flush_shader_data_()
 {
        if(shdata_stack.size()>state->shdata_count)
                shdata_stack.erase(shdata_stack.begin()+state->shdata_count, shdata_stack.end());
index 69474d4034b03b63bb8b8b20553dc2e91e7e0401..489cebb8f407b1f1cd8f4f76db9d5cbe39905580 100644 (file)
@@ -165,8 +165,11 @@ public:
        Renderer state is popped. */
        void add_shader_data(const ProgramData &data);
 
-       void flush_shader_data();
+       DEPRECATED void flush_shader_data() { flush_shader_data_(); }
+private:
+       void flush_shader_data_();
 
+public:
        void set_vertex_setup(const VertexSetup *);
        void set_winding_test(const WindingTest *);
        void set_reverse_winding(bool);