X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbatch.cpp;h=385b4697085f6215e075344ac9a980007212e193;hb=a4ec5410595ddf37bfbc0e85ad87d31a9cbf94f1;hp=d650fda8b6c3576cf3605d0f632f4d0faf17200f;hpb=f71aee8c20ff85e4857e4dfad0c20ce606ea3717;p=libs%2Fgl.git diff --git a/source/batch.cpp b/source/batch.cpp index d650fda8..385b4697 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 "version_1_2.h" using namespace std; @@ -17,9 +18,11 @@ Batch::Batch(PrimitiveType t): type(t), min_index(0), max_index(0) -{ } +{ + require_version(1, 2); +} -void Batch::append(uint i) +Batch &Batch::append(uint i) { if(indices.empty()) min_index=max_index=i; @@ -29,6 +32,8 @@ void Batch::append(uint i) max_index=max(max_index, i); } indices.push_back(i); + + return *this; } void Batch::append(const vector &ind)