X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fgeometrybuilder.h;h=40bcd13e6b37b504d3c22ad3780ccce7a9b521b1;hp=a0538b5933fe163b6ef04085b1dedfc32e402385;hb=0f890ce60a560ba2ccc0719229be304bb597d919;hpb=bbfb79181f716736df413f463b55825866400ed8 diff --git a/source/geometrybuilder.h b/source/geometrybuilder.h index a0538b59..40bcd13e 100644 --- a/source/geometrybuilder.h +++ b/source/geometrybuilder.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2011 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GL_GEOMETRYBUILDER_H_ #define MSP_GL_GEOMETRYBUILDER_H_ @@ -20,22 +13,23 @@ public: enum TextureFit { STRETCH, - CUT, + CROP, WRAP }; protected: - int tangent_attr; - int binormal_attr; + bool generate_tbn; TextureFit tex_fit; GeometryBuilder(); public: - GeometryBuilder &tangent(unsigned); - GeometryBuilder &binormal(unsigned); + GeometryBuilder &tbn(bool = true); GeometryBuilder &texture_fit(TextureFit); +protected: + void adjust_texture_scale(float &, float &, float, float) const; +public: virtual void build(PrimitiveBuilder &) const = 0; void build(Mesh &) const; };