+ VertexArray vertices;
+ std::vector<Batch> batches;
+ Buffer *vbuf;
+ Buffer *ibuf;
+ unsigned vao_id;
+ bool defer_buffers;
+ mutable bool dirty;
+ bool disallow_rendering;
+ const WindingTest *winding;
+
+public:
+ Mesh(ResourceManager * = 0);
+ Mesh(const VertexFormat &, ResourceManager * = 0);
+private:
+ void init(ResourceManager *);
+public:
+ ~Mesh();
+
+ void clear();
+ void use_buffers(bool);
+private:
+ void create_buffers();
+ void setup_vao() const;
+
+public:
+ const VertexArray &get_vertices() const { return vertices; }
+ const Buffer *get_index_buffer() const { return ibuf; }
+ unsigned get_n_vertices() const;
+ float *modify_vertex(unsigned);
+