- glDrawRangeElements(prim_type, min_index, max_index, size(), data_type, reinterpret_cast<void *>(get_offset()));
+ data_ptr = reinterpret_cast<const void *>(get_offset());
+ }
+ else
+ data_ptr = &data[0];
+
+ if(EXT_draw_range_elements)
+ glDrawRangeElements(prim_type, min_index, max_index, size(), data_type, data_ptr);
+ else
+ glDrawElements(prim_type, size(), data_type, data_ptr);
+}
+
+void Batch::set_restart_index(unsigned index)
+{
+ if(MSP_primitive_restart)
+ {
+ if(index>0)
+ {
+ if(!restart_index)
+ glEnable(GL_PRIMITIVE_RESTART);
+ glPrimitiveRestartIndex(index);
+ }
+ else
+ glDisable(GL_PRIMITIVE_RESTART);