Distributed under the LGPL
*/
-#define GL_GLEXT_PROTOTYPES
#include "batch.h"
+#include "extension.h"
+#include "vertexarray.h"
using namespace std;
max_index(0)
{ }
-void Batch::append(uint i)
+Batch &Batch::append(uint i)
{
if(indices.empty())
min_index=max_index=i;
max_index=max(max_index, i);
}
indices.push_back(i);
+
+ return *this;
}
void Batch::append(const vector<uint> &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]);
}