X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexsetup.h;h=c4cadfcaed49a9206d3ef500df6688b4f762edae;hp=466eed40659d3d61fa8c9a27b00520ac43849c73;hb=f5ac652497f22b159b5e44bf69f44092ff91936b;hpb=f3ee640033ec6367915b51a3beaf2330f39d75ac diff --git a/source/vertexsetup.h b/source/vertexsetup.h index 466eed40..c4cadfca 100644 --- a/source/vertexsetup.h +++ b/source/vertexsetup.h @@ -15,8 +15,14 @@ objects. Intended for internal use. class VertexSetup: public Bindable { private: + enum ComponentMask + { + VERTEX_ARRAY = 1, + INDEX_BUFFER = 2 + }; + unsigned id; - mutable bool dirty; + mutable unsigned dirty; const VertexArray *array; const Buffer *index_buffer; @@ -25,11 +31,13 @@ public: ~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;