X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexsetup.h;h=0155302cd6fb86bad0b99537e87a363ed0588f40;hb=f50822b9e73a6ecdacbc4af4c4d9aba435a72386;hp=466eed40659d3d61fa8c9a27b00520ac43849c73;hpb=f3ee640033ec6367915b51a3beaf2330f39d75ac;p=libs%2Fgl.git diff --git a/source/vertexsetup.h b/source/vertexsetup.h index 466eed40..0155302c 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(bool) const; public: void bind() const;