{
allow_pointer_reload = false;
- add("mesh", static_cast<void (Loader::*)()>(&Loader::mesh));
- add("mesh", static_cast<void (Loader::*)(unsigned)>(&Loader::mesh));
- add("mesh", static_cast<void (Loader::*)(const std::string &)>(&Loader::mesh));
- add("mesh", static_cast<void (Loader::*)(unsigned, const std::string &)>(&Loader::mesh));
+ add("mesh", &Loader::mesh_inline);
+ add("mesh", &Loader::mesh_inline_lod);
+ add("mesh", &Loader::mesh);
+ add("mesh", &Loader::mesh_lod);
+ add("technique", &Loader::technique_inline);
+ add("technique", &Loader::technique);
+
// Deprecated alias, will be removed
- add("lod_mesh", static_cast<void (Loader::*)(unsigned, const std::string &)>(&Loader::mesh));
- add("technique", static_cast<void (Loader::*)()>(&Loader::technique));
- add("technique", static_cast<void (Loader::*)(const std::string &)>(&Loader::technique));
+ add("lod_mesh", &Loader::mesh_lod);
}
-void Object::Loader::mesh()
+void Object::Loader::mesh_inline()
{
RefPtr<Mesh> msh = new Mesh;
load_sub(*msh);
obj.meshes.front() = msh;
}
-void Object::Loader::mesh(unsigned l)
+void Object::Loader::mesh_inline_lod(unsigned l)
{
if(l>obj.meshes.size())
throw InvalidParameterValue("LODs must be continuous");
obj.set_mesh(get_collection().get<Mesh>(n));
}
-void Object::Loader::mesh(unsigned l, const string &n)
+void Object::Loader::mesh_lod(unsigned l, const string &n)
{
obj.set_mesh(l, get_collection().get<Mesh>(n));
}
-void Object::Loader::technique()
+void Object::Loader::technique_inline()
{
RefPtr<Technique> tech = new Technique;
if(coll)
allow_pointer_reload = false;
add("shader", &RenderPass::shprog);
- add("material", static_cast<void (Loader::*)()>(&Loader::material));
- add("material", static_cast<void (Loader::*)(const string &)>(&Loader::material));
+ add("material", &Loader::material_inline);
+ add("material", &Loader::material);
add("texunit", &Loader::texunit);
add("uniforms", &Loader::uniforms);
}
obj.shdata = new ProgramData;
}
-void RenderPass::Loader::material()
+void RenderPass::Loader::material_inline()
{
RefPtr<Material> mat = new Material;
load_sub(*mat);