4 #include <msp/datafile/objectloader.h>
6 #include "vertexarray.h"
7 #include "windingtest.h"
17 friend class MeshBuilder;
20 class Loader: public DataFile::ObjectLoader<Mesh>
25 void vertices(VertexFormat);
26 void batch(PrimitiveType);
27 void winding(FaceWinding);
32 std::list<Batch> batches;
35 const WindingTest *winding;
39 Mesh(const VertexFormat &f);
43 void use_buffers(bool);
45 const VertexArray &get_vertices() const { return vertices; }
46 unsigned get_n_vertices() const;
47 float *modify_vertex(unsigned);
49 void add_batch(const Batch &b);
50 const std::list<Batch> &get_batches() { return batches; }
52 void set_winding(const WindingTest *);
55 void draw(Renderer &) const;