]> git.tdb.fi Git - libs/gl.git/blobdiff - source/batch.cpp
Generalize VertexBuffer into Buffer with support for other types as well
[libs/gl.git] / source / batch.cpp
index f2a57bcf2fa2ad4f1ea1f4f6c90a17ab85d8cf3f..e522491144f1a7f6a06a0329e5c8e1721b241e69 100644 (file)
@@ -46,6 +46,11 @@ void Batch::draw() const
        draw_range_elements(type, min_index, max_index, indices.size(), &indices[0]);
 }
 
+void Batch::draw_with_buffer(unsigned offset) const
+{
+       draw_range_elements(type, min_index, max_index, indices.size(), (unsigned *)0+offset);
+}
+
 
 Batch::Loader::Loader(Batch &b):
        batch(b)