#include <msp/core/algorithm.h>
#include "effect.h"
+using namespace std;
+
namespace Msp {
namespace GL {
-Effect::Effect(Renderable &r):
- renderable(r)
+Effect::Effect(Renderable &c):
+ content(c)
{
enable_for_method(Tag());
}
}
+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<Template>(t, &c)
{ }
void Effect::Template::Loader::init_actions()
{
add("content", &Template::content_name);
+ add("enable_for_method", &Loader::enable_for_method);
+}
+
+void Effect::Template::Loader::enable_for_method(const string &m)
+{
+ obj.enabled_methods.push_back(m);
}
} // namespace GL