X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbatch.cpp;h=e522491144f1a7f6a06a0329e5c8e1721b241e69;hb=e20075bffbbe1f3aaa9cc149953525a7e855f496;hp=df4e2fb828e0102989abd2ddacb069f59a33d3a9;hpb=cea3c333797cadd9629aefaa5b82243173a02d16;p=libs%2Fgl.git diff --git a/source/batch.cpp b/source/batch.cpp index df4e2fb8..e5224911 100644 --- a/source/batch.cpp +++ b/source/batch.cpp @@ -5,8 +5,9 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#define GL_GLEXT_PROTOTYPES #include "batch.h" +#include "extension.h" +#include "vertexarray.h" using namespace std; @@ -42,7 +43,12 @@ void Batch::append(const vector &ind) void Batch::draw() const { - glDrawRangeElements(type, min_index, max_index, indices.size(), GL_UNSIGNED_INT, &indices[0]); + 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); }