Fixed problems, textured cube

This commit is contained in:
Thomas FORGIONE
2016-12-02 09:53:07 +01:00
parent 6c1e288b78
commit c81dbc8715
6 changed files with 43 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ class Material:
try:
ix, iy, image = self.map_Kd.size[0], self.map_Kd.size[1], self.map_Kd.tobytes("raw", "RGBA", 0, -1)
except SystemError:
except:
ix, iy, image = self.map_Kd.size[0], self.map_Kd.size[1], self.map_Kd.tobytes("raw", "RGBX", 0, -1)
self.id = gl.glGenTextures(1)

View File

@@ -53,7 +53,7 @@ class OBJParser(ModelParser):
face.material = self.current_material
self.add_face(face)
elif len(split) == 4:
face = Face().form_array(splits[:3])
face = Face().from_array(splits[:3])
face.material = self.current_material
self.add_face(face)