3 This file is part of libmspgl
4 Copyright © 2007-2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
11 #include <msp/datafile/objectloader.h>
13 #include "vertexarray.h"
23 friend class MeshBuilder;
26 class Loader: public DataFile::ObjectLoader<Mesh>
31 void vertices(VertexFormat);
32 void batch(PrimitiveType);
37 std::list<Batch> batches;
43 Mesh(const VertexFormat &f);
47 void use_buffers(bool);
49 const VertexArray &get_vertices() const { return vertices; }
50 unsigned get_n_vertices() const;
51 float *modify_vertex(unsigned);
53 void add_batch(const Batch &b);
54 const std::list<Batch> &get_batches() { return batches; }
57 void draw(Renderer &) const;