From: Mikko Rasa Date: Sun, 8 Aug 2021 22:52:31 +0000 (+0300) Subject: Deprecate external access to Renderer::flush_shader_data X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c5583e23cc7b064ac28f2b2b6993d1e5fa415d5b;p=libs%2Fgl.git Deprecate external access to Renderer::flush_shader_data It's no longer needed since changes in ProgramData are tracked with a generation number. --- diff --git a/source/render/renderer.cpp b/source/render/renderer.cpp index 7389298a..8de24adb 100644 --- a/source/render/renderer.cpp +++ b/source/render/renderer.cpp @@ -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()); diff --git a/source/render/renderer.h b/source/render/renderer.h index 69474d40..489cebb8 100644 --- a/source/render/renderer.h +++ b/source/render/renderer.h @@ -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);