+ if(mask&VERTEX_ARRAY)
+ update_vertex_array(*vertex_array, 0, 0, direct);
+
+ if(mask&INSTANCE_ARRAY)
+ {
+ if(inst_array)
+ update_vertex_array(*inst_array, 1, 1, direct);
+ }
+
+ if(mask&INDEX_BUFFER)
+ {
+ if(direct)
+ glVertexArrayElementBuffer(id, index_buffer->get_id());
+ else
+ glBindBuffer(ELEMENT_ARRAY_BUFFER, index_buffer->get_id());
+ }
+}
+
+void VertexSetup::update_vertex_array(const VertexArray &array, unsigned binding, unsigned divisor, bool direct) const
+{
+ Conditional<Bind> bind_vbuf(!direct, array.get_buffer(), ARRAY_BUFFER);