3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
18 vertices.use_vertex_buffer();
21 Mesh::Mesh(VertexFormat f):
24 vertices.use_vertex_buffer();
27 void Mesh::add_batch(const Batch &b)
32 void Mesh::draw() const
35 for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
40 Mesh::Loader::Loader(Mesh &m):
43 add("vertices", &Loader::vertices);
44 add("batch", &Loader::batch);
47 void Mesh::Loader::vertices(VertexFormat f)
49 mesh.vertices.reset(f);
50 load_sub(mesh.vertices);
53 void Mesh::Loader::batch(PrimitiveType p)
55 mesh.batches.push_back(Batch(p));
56 load_sub(mesh.batches.back());