X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fgeometrybuilder.cpp;h=ba3e86004c5813dbe1649bc66cba5f475c6de61b;hp=97c88e06def4cabe37d917d15ebc93ed119668ad;hb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;hpb=bbfb79181f716736df413f463b55825866400ed8 diff --git a/source/geometrybuilder.cpp b/source/geometrybuilder.cpp index 97c88e06..ba3e8600 100644 --- a/source/geometrybuilder.cpp +++ b/source/geometrybuilder.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2011 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "geometrybuilder.h" #include "meshbuilder.h" @@ -35,9 +28,21 @@ GeometryBuilder &GeometryBuilder::texture_fit(TextureFit tf) return *this; } +void GeometryBuilder::adjust_texture_scale(float &u_scale, float &v_scale, float width, float height) const +{ + if(tex_fit!=STRETCH) + { + if((width