bool replaced = false;
for(PassMap::iterator i=passes.begin(); i!=passes.end(); ++i)
{
- int index = i->second.get_texture_index(slot);
- if(index>=0)
+ Tag tag = i->second.get_texture_tag(slot);
+ if(tag.id)
{
- i->second.set_texture(index, &tex);
+ i->second.set_texture(tag, &tex);
replaced = true;
}
}
}
+DataFile::Loader::ActionMap Technique::Loader::shared_actions;
+
Technique::Loader::Loader(Technique &t):
DataFile::CollectionObjectLoader<Technique>(t, 0)
{
- init();
+ set_actions(shared_actions);
}
Technique::Loader::Loader(Technique &t, Collection &c):
DataFile::CollectionObjectLoader<Technique>(t, &c)
{
- init();
+ set_actions(shared_actions);
}
-void Technique::Loader::init()
+void Technique::Loader::init_actions()
{
add("inherit", &Loader::inherit);
add("pass", &Loader::pass);