3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
11 #include <msp/datafile/objectloader.h>
13 #include "vertexarray.h"
22 friend class MeshBuilder;
25 class Loader: public DataFile::ObjectLoader<Mesh>
30 void vertices(VertexFormat);
31 void batch(PrimitiveType);
36 std::list<Batch> batches;
41 Mesh(const VertexFormat &f);
43 void use_vertex_buffer(bool);
44 const VertexArray &get_vertices() const { return vertices; }
45 float *get_vertex(unsigned);
46 void add_batch(const Batch &b);
47 const std::list<Batch> &get_batches() { return batches; }
51 void update_index_buffer();