]> git.tdb.fi Git - libs/gl.git/blobdiff - source/batch.cpp
Inherit Loaders from the ObjectLoader classes
[libs/gl.git] / source / batch.cpp
index f2a57bcf2fa2ad4f1ea1f4f6c90a17ab85d8cf3f..33481a1cdfc8c613692f36de60e667e8413ed698 100644 (file)
@@ -46,16 +46,21 @@ 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)
+       DataFile::ObjectLoader<Batch>(b)
 {
        add("indices", &Loader::indices);
 }
 
 void Batch::Loader::indices(const vector<uint> &ind)
 {
-       batch.append(ind);
+       obj.append(ind);
 }
 
 } // namespace GL