]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/brushexport/export.cpp
- Fixed brushexport2 output float-format (Shaderman)
[xonotic/netradiant.git] / contrib / brushexport / export.cpp
index ac42111406aa374fb28cfbcf4870e0f75e19f41a..ffa40201dc609c12b97d622ef00def04fe09cb15 100644 (file)
@@ -191,7 +191,7 @@ bool ExportDataAsWavefront::WriteToFile(const std::string& path) const
                        \r
                        // vertices\r
                        for(size_t i = 0; i < w.numpoints; ++i)\r
-                       out << "v " << w[i].vertex.x() << " " << w[i].vertex.y() << " " << w[i].vertex.z() << "\n";\r
+                               out << "v " << FloatFormat(w[i].vertex.x(), 1, 6) << " " << FloatFormat(w[i].vertex.y(), 1, 6) << " " << FloatFormat(w[i].vertex.z(), 1, 6) << "\n";\r
                }\r
                out << "\n";    \r
                \r
@@ -201,7 +201,7 @@ bool ExportDataAsWavefront::WriteToFile(const std::string& path) const
                        \r
                        // texcoords\r
                        for(size_t i = 0; i < w.numpoints; ++i)\r
-                       out << "vt " << w[i].texcoord.x() << " " << w[i].texcoord.y() << "\n";\r
+                               out << "vt " << FloatFormat(w[i].texcoord.x(), 1, 6) << " " << FloatFormat(w[i].texcoord.y(), 1, 6) << "\n";\r
                }\r
                \r
                for(std::list<const Face*>::const_iterator it(git->faces.begin()); it != end; ++it)\r