]> git.tdb.fi Git - libs/gl.git/blobdiff - source/batch.cpp
Windows compatibility:
[libs/gl.git] / source / batch.cpp
index d650fda8b6c3576cf3605d0f632f4d0faf17200f..385b4697085f6215e075344ac9a980007212e193 100644 (file)
@@ -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<uint> &ind)