X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Ftechnique.cpp;h=b5ed6447c314c3e69be3bfe0fcb0c08be67cfc07;hb=fcde8390ad577fe434dcd4b29e0f410d29f867c9;hp=12111e5e675305aa98859bf1ba58f2c332bb544e;hpb=6f39983060a27634c012f66c82fea0d09fea9774;p=libs%2Fgl.git diff --git a/source/materials/technique.cpp b/source/materials/technique.cpp index 12111e5e..b5ed6447 100644 --- a/source/materials/technique.cpp +++ b/source/materials/technique.cpp @@ -101,20 +101,32 @@ bool Technique::has_shaders() const return false; } +void Technique::set_debug_name(const std::string &name) +{ +#ifdef DEBUG + for(map::iterator i=passes.begin(); i!=passes.end(); ++i) + i->second.set_debug_name(format("%s [pass:%s]", name, i->first.str())); +#else + (void)name; +#endif +} + + +DataFile::Loader::ActionMap Technique::Loader::shared_actions; Technique::Loader::Loader(Technique &t): DataFile::CollectionObjectLoader(t, 0) { - init(); + set_actions(shared_actions); } Technique::Loader::Loader(Technique &t, Collection &c): DataFile::CollectionObjectLoader(t, &c) { - init(); + set_actions(shared_actions); } -void Technique::Loader::init() +void Technique::Loader::init_actions() { add("inherit", &Loader::inherit); add("pass", &Loader::pass);