X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbatch.cpp;h=33481a1cdfc8c613692f36de60e667e8413ed698;hb=927a1aa0a3a27e463ec0efc08bd08e7c4e969909;hp=f2a57bcf2fa2ad4f1ea1f4f6c90a17ab85d8cf3f;hpb=dc1d1159a61f378bda11e5989ad694a86b9a3c77;p=libs%2Fgl.git diff --git a/source/batch.cpp b/source/batch.cpp index f2a57bcf..33481a1c 100644 --- a/source/batch.cpp +++ b/source/batch.cpp @@ -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(b) { add("indices", &Loader::indices); } void Batch::Loader::indices(const vector &ind) { - batch.append(ind); + obj.append(ind); } } // namespace GL