X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmeshbuilder.cpp;h=6f90f67de40cd9940dd381727b9a592b0876582b;hb=df6f8f1f26b1f230dcb1d626d278c43fd48d468d;hp=025bced159fc999c748e244efdb1a87df12fd3f3;hpb=0f3ae7cf6aed59f07895dfbef6740be3b666fc20;p=libs%2Fgl.git diff --git a/source/meshbuilder.cpp b/source/meshbuilder.cpp index 025bced1..6f90f67d 100644 --- a/source/meshbuilder.cpp +++ b/source/meshbuilder.cpp @@ -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,16 +17,21 @@ MeshBuilder::MeshBuilder(Mesh &m): batch(0) { } +void MeshBuilder::auto_offset() +{ + offset(mesh.get_vertices().size()); +} + void MeshBuilder::begin_() { - batch=new Batch(type); + batch = new Batch(type); } void MeshBuilder::end_() { mesh.add_batch(*batch); delete batch; - batch=0; + batch = 0; } void MeshBuilder::element_(unsigned i)