]> git.tdb.fi Git - libs/gl.git/blobdiff - source/meshbuilder.cpp
Add an element offset to PrimitiveBuilder
[libs/gl.git] / source / meshbuilder.cpp
index b238ae63b9a76a608d968bb5b36e44af0cf62445..6f90f67de40cd9940dd381727b9a592b0876582b 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Copyright © 2008, 2010-2011  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -17,6 +17,11 @@ MeshBuilder::MeshBuilder(Mesh &m):
        batch(0)
 { }
 
+void MeshBuilder::auto_offset()
+{
+       offset(mesh.get_vertices().size());
+}
+
 void MeshBuilder::begin_()
 {
        batch = new Batch(type);