X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmeshbuilder.cpp;h=57e85fc640ab1a66dc6d5a26187045507d479e1f;hp=025bced159fc999c748e244efdb1a87df12fd3f3;hb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;hpb=0f3ae7cf6aed59f07895dfbef6740be3b666fc20 diff --git a/source/meshbuilder.cpp b/source/meshbuilder.cpp index 025bced1..57e85fc6 100644 --- a/source/meshbuilder.cpp +++ b/source/meshbuilder.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "mesh.h" #include "meshbuilder.h" @@ -17,16 +10,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)