3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
19 void Mesh::draw() const
22 for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
27 Mesh::Loader::Loader(Mesh &m):
30 add("vertices", &Loader::vertices);
31 add("batch", &Loader::batch);
34 void Mesh::Loader::vertices(VertexFormat f)
36 mesh.vertices.reset(f);
37 load_sub(mesh.vertices);
40 void Mesh::Loader::batch(PrimitiveType p)
42 mesh.batches.push_back(Batch(p));
43 load_sub(mesh.batches.back());