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 RefPtr<MeshBuilder> Mesh::modify()
29 return new MeshBuilder(*this);
32 void Mesh::add_batch(const Batch &b)
37 void Mesh::draw() const
40 for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
45 Mesh::Loader::Loader(Mesh &m):
48 add("vertices", &Loader::vertices);
49 add("batch", &Loader::batch);
52 void Mesh::Loader::vertices(VertexFormat f)
54 mesh.vertices.reset(f);
55 load_sub(mesh.vertices);
58 void Mesh::Loader::batch(PrimitiveType p)
60 mesh.batches.push_back(Batch(p));
61 load_sub(mesh.batches.back());