- Mesh();
- Mesh(VertexFormat f);
- RefPtr<VertexArrayBuilder> modify_vertices() { return vertices.modify(); }
- void add_batch(const Batch &b);
+ VertexArray vertices;
+ std::list<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: