class VertexSetup: public Bindable<VertexSetup>
{
private:
+ enum ComponentMask
+ {
+ VERTEX_ARRAY = 1,
+ INDEX_BUFFER = 2
+ };
+
unsigned id;
- mutable bool dirty;
+ mutable unsigned dirty;
const VertexArray *array;
const Buffer *index_buffer;
~VertexSetup();
void set_vertex_array(const VertexArray &);
+ void set_instance_array(const VertexArray &);
void set_index_buffer(const Buffer &);
const Buffer *get_index_buffer() const { return index_buffer; }
private:
- void update() const;
+ void update(unsigned) const;
+ void update_vertex_array() const;
public:
void bind() const;