From: Mikko Rasa Date: Fri, 11 Mar 2022 09:24:39 +0000 (+0200) Subject: Support specifying enabled methods in effect templates X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7ab8bc0724f40b46d7f5da1bcb05ab6d0cecbb43;p=libs%2Fgl.git Support specifying enabled methods in effect templates --- diff --git a/source/effects/effect.cpp b/source/effects/effect.cpp index 878e23fb..0ead01c3 100644 --- a/source/effects/effect.cpp +++ b/source/effects/effect.cpp @@ -1,6 +1,8 @@ #include #include "effect.h" +using namespace std; + namespace Msp { namespace GL { @@ -31,6 +33,13 @@ bool Effect::is_enabled_for_method(Tag tag) const } +void Effect::Template::create_base(Effect &effect) const +{ + for(Tag m: enabled_methods) + effect.enable_for_method(m); +} + + Effect::Template::Loader::Loader(Template &t, Collection &c): CollectionObjectLoader