+{
+ BindRestore _bind_ibuf(get_buffer(), ELEMENT_ARRAY_BUFFER);
+ const void *data_ptr = setup_draw();
+
+ glDrawElements(prim_type, size(), data_type, data_ptr);
+}
+
+void Batch::draw_instanced(unsigned count) const
+{
+ static Require req(ARB_draw_instanced);
+
+ BindRestore _bind_ibuf(get_buffer(), ELEMENT_ARRAY_BUFFER);
+ const void *data_ptr = setup_draw();
+
+ glDrawElementsInstanced(prim_type, size(), data_type, data_ptr, count);
+}
+
+const void *Batch::setup_draw() const