- vertexArrayMap=vertexarraymap.VertexArrayMapWithUV(\r
- [material.MQOMaterial.create(m, basedir) \r
- for m in io.materials])\r
- for o in io.objects:\r
+ vertexArrayMap=opengl.vertexarraymap.VertexArrayMapWithUV()\r
+ for m in model.materials:\r
+ material=opengl.material.MQOMaterial()\r
+ material.rgba=(m.color.r, m.color.g, m.color.b, m.color.a)\r
+ if m.tex:\r
+ texturepath=os.path.join(basedir, m.tex.decode('cp932'))\r
+ material.texture=opengl.texture.Texture(texturepath)\r
+ vertexArrayMap.addMaterial(material)\r
+\r
+ for o in model.objects:\r