X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=mesh_export.py;h=1e0047dc483cf67817fdb27a6797e8871c18b881;hb=cd446554e998204eaba22504b7b28227feb8edbb;hp=4265ca3db25eab075a32b6fb5ae53af68eaaa9ef;hpb=2663d392c1c60e0ca511bb836010124024da3276;p=libs%2Fgl.git diff --git a/mesh_export.py b/mesh_export.py index 4265ca3d..1e0047dc 100644 --- a/mesh_export.py +++ b/mesh_export.py @@ -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()