Merge pull request #4792 from howard-stearns/objReader-tweak

Obj reader tweak
This commit is contained in:
Seth Alves 2015-05-07 18:39:37 -07:00
commit a775c1fb98
2 changed files with 4 additions and 1 deletions

View file

@ -510,6 +510,9 @@ FBXGeometry OBJReader::readOBJ(QIODevice* device, const QVariantHash& mapping, Q
<< textureUVs[face.textureUVIndices[0]]
<< textureUVs[face.textureUVIndices[1]]
<< textureUVs[face.textureUVIndices[2]];
} else {
glm::vec2 corner(0.0f, 1.0f);
mesh.texCoords << corner << corner << corner;
}
}
}

View file

@ -56,7 +56,7 @@ public:
glm::vec3 specularColor;
QByteArray diffuseTextureFilename;
QByteArray specularTextureFilename;
OBJMaterial() : opacity(1.0f) {}
OBJMaterial() : shininess(96.0f), opacity(1.0f), diffuseColor(1.0f), specularColor(1.0f) {}
};
class OBJReader: public QObject { // QObject so we can make network requests.