- add("material", &Object::material);
- add("material_inline", &Loader::material_inline);
- add("mesh", &Loader::mesh);
- add("pass", &Loader::pass);
- add("shader", &Loader::shader);
- add("texture", &Loader::texture);
-}
-
-Object::Loader::~Loader()
-{
- for(map<string, ObjectPass>::iterator i=obj.passes.begin(); i!=obj.passes.end(); ++i)
- if(i->second.shdata)
- {
- for(unsigned j=0; j<textures.size(); ++j)
- i->second.shdata->uniform(i->second.shprog->get_uniform_location(textures[j]), static_cast<int>(j));
- }
+ add("mesh", static_cast<void (Loader::*)()>(&Loader::mesh));
+ add("mesh", static_cast<void (Loader::*)(const std::string &)>(&Loader::mesh));
+ add("technique", &Loader::technique);
+ add("technique", &Object::technique);