]> git.tdb.fi Git - libs/gl.git/blobdiff - mesh_export.py
Use VertexBuilder's MatrixStack in Font
[libs/gl.git] / mesh_export.py
index 4265ca3db25eab075a32b6fb5ae53af68eaaa9ef..1e0047dc483cf67817fdb27a6797e8871c18b881 100644 (file)
@@ -671,7 +671,7 @@ class Exporter:
                                self.out_file.begin("texture2d")
                                self.out_file.write("min_filter", "NEAREST")
                                self.out_file.write("mag_filter", "NEAREST")
-                               self.out_file.write("storage", "RGB", len(mesh.materials), 1, 0)
+                               self.out_file.write("storage", "RGB", len(mesh.materials), 1)
                                texdata = '"'
                                for m in mesh.materials:
                                        texdata += "\\x%02X\\x%02X\\x%02X"%(int(m.R*255), int(m.G*255), int(m.B*255))
@@ -684,7 +684,8 @@ class Exporter:
                                self.out_file.begin("material")
                                self.out_file.write("diffuse", m.R, m.G, m.B, 1.0)
                                self.out_file.write("ambient", m.R*m.amb, m.G*m.amb, m.B*m.amb, 1.0)
-                               self.out_file.write("specular", m.specR, m.specG, m.specB, 1.0)
+                               self.out_file.write("specular", m.specR*m.spec, m.specG*m.spec, m.specB*m.spec, 1.0)
+                               self.out_file.write("shininess", m.hard);
                                self.out_file.end()
                        self.out_file.end()
                        self.out_file.end()