From 5542f100cd82561aae4605dfca5a58b0eec8e2ae Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 13 Oct 2021 12:26:36 +0300 Subject: [PATCH] Rename Effect::enabled_passes to enabled_methods --- source/effects/effect.cpp | 10 +++++----- source/effects/effect.h | 6 +++--- source/effects/environmentmap.cpp | 2 +- source/effects/shadowmap.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/effects/effect.cpp b/source/effects/effect.cpp index 584117e7..4ab867ff 100644 --- a/source/effects/effect.cpp +++ b/source/effects/effect.cpp @@ -6,17 +6,17 @@ namespace GL { Effect::Effect(Renderable &r): renderable(r) { - enabled_passes.insert(Tag()); + enabled_methods.insert(Tag()); } -void Effect::enable_for_pass(Tag tag) +void Effect::enable_for_method(Tag tag) { - enabled_passes.insert(tag); + enabled_methods.insert(tag); } -void Effect::disable_for_pass(Tag tag) +void Effect::disable_for_method(Tag tag) { - enabled_passes.erase(tag); + enabled_methods.erase(tag); } } // namespace GL diff --git a/source/effects/effect.h b/source/effects/effect.h index d763f251..9bf49c22 100644 --- a/source/effects/effect.h +++ b/source/effects/effect.h @@ -16,15 +16,15 @@ class Effect: public Renderable { protected: Renderable &renderable; - std::set enabled_passes; + std::set enabled_methods; protected: Effect(Renderable &); public: virtual ~Effect() { } - void enable_for_pass(Tag); - void disable_for_pass(Tag); + void enable_for_method(Tag); + void disable_for_method(Tag); virtual const Matrix *get_matrix() const { return renderable.get_matrix(); } virtual const Geometry::BoundingSphere *get_bounding_sphere() const { return renderable.get_bounding_sphere(); } diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index bf09085b..782a3d2a 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -165,7 +165,7 @@ void EnvironmentMap::finish_frame() void EnvironmentMap::render(Renderer &renderer, Tag tag) const { - if(!enabled_passes.count(tag)) + if(!enabled_methods.count(tag)) return renderer.render(renderable, tag); Renderer::Push _push_rend(renderer); diff --git a/source/effects/shadowmap.cpp b/source/effects/shadowmap.cpp index c8c1e6eb..6c49f79f 100644 --- a/source/effects/shadowmap.cpp +++ b/source/effects/shadowmap.cpp @@ -250,7 +250,7 @@ void ShadowMap::finish_frame() void ShadowMap::render(Renderer &renderer, Tag tag) const { - if(!enabled_passes.count(tag)) + if(!enabled_methods.count(tag)) return renderer.render(renderable, tag); Renderer::Push _push_rend(renderer); -- 2.45.2