add("winding", &Loader::winding);
}
-void Mesh::Loader::vertices(VertexFormat f)
+void Mesh::Loader::vertices(const vector<VertexComponent> &c)
{
- obj.vertices.reset(f);
+ if(c.empty())
+ throw invalid_argument("No vertex components");
+
+ VertexFormat fmt;
+ for(vector<VertexComponent>::const_iterator i=c.begin(); i!=c.end(); ++i)
+ fmt = (fmt, *i);
+ obj.vertices.reset(fmt);
load_sub(obj.vertices);
}