From: Mikko Rasa Date: Fri, 12 Nov 2021 16:52:44 +0000 (+0200) Subject: Remove deprecated functions from Renderer X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=42c44db6aa2961cffea6263f337adbd9d161c59c;p=libs%2Fgl.git Remove deprecated functions from Renderer --- diff --git a/source/render/renderer.cpp b/source/render/renderer.cpp index b935ce14..044ab55d 100644 --- a/source/render/renderer.cpp +++ b/source/render/renderer.cpp @@ -110,18 +110,6 @@ void Renderer::flush_textures() texture_stack.erase(texture_stack.begin()+state->texture_count, texture_stack.end()); } -void Renderer::set_material(const Material *m) -{ - if(m) - add_shader_data(m->get_shader_data()); -} - -void Renderer::set_lighting(const Lighting *l) -{ - if(l) - add_shader_data(l->get_shader_data()); -} - void Renderer::set_shader_program(const Program *p, const ProgramData *d) { state->shprog = p; @@ -141,13 +129,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 107efcb7..36fe6c91 100644 --- a/source/render/renderer.h +++ b/source/render/renderer.h @@ -134,11 +134,8 @@ public: void set_texture(Tag, const Texture *, const Sampler * = 0); private: void flush_textures(); -public: - DEPRECATED void set_material(const Material *); - - DEPRECATED void set_lighting(const Lighting *); +public: /** Sets the shader program to use. As a convenience, uniform values may be specified at the same time. */ void set_shader_program(const Program *prog, const ProgramData *data = 0); @@ -148,9 +145,8 @@ public: last will be used. */ void add_shader_data(const ProgramData &data); - DEPRECATED void flush_shader_data() { flush_shader_data_(); } private: - void flush_shader_data_(); + void flush_shader_data(); public: void set_vertex_setup(const VertexSetup *);