]> git.tdb.fi Git - libs/gl.git/blobdiff - source/box.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / box.cpp
index 21d5f33f984ebfbbcb0411b3dcfa0148c3fe38c3..0958d1b0930daa8d187e6dc430b4a8ed0886bc1a 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <cmath>
 #include "box.h"
 #include "primitivebuilder.h"
@@ -55,13 +48,7 @@ void BoxBuilder::build_face(PrimitiveBuilder &builder, const Vector3 &o, const V
 
        float u_size = 1;
        float v_size = 1;
-       if(tex_fit!=STRETCH)
-       {
-               if((l1<l2)==(tex_fit==CUT))
-                       u_size = l1/l2;
-               else
-                       v_size = l2/l1;
-       }
+       adjust_texture_scale(u_size, v_size, l1, l2);
 
        builder.begin(TRIANGLE_STRIP);
        builder.texcoord(0, v_size);