Fix texture coords exporting on binary PLY files

pull/863/head
mpersano 2016-04-22 16:09:45 -03:00
parent 2a3c2e3a21
commit 473d2ca052
1 changed files with 2 additions and 2 deletions

View File

@ -309,10 +309,10 @@ void PlyExporter::WriteMeshVertsBinary(const aiMesh* m, unsigned int components)
for (unsigned int n = PLY_EXPORT_HAS_TEXCOORDS, c = 0; (components & n) && c != AI_MAX_NUMBER_OF_TEXTURECOORDS; n <<= 1, ++c) { for (unsigned int n = PLY_EXPORT_HAS_TEXCOORDS, c = 0; (components & n) && c != AI_MAX_NUMBER_OF_TEXTURECOORDS; n <<= 1, ++c) {
if (m->HasTextureCoords(c)) { if (m->HasTextureCoords(c)) {
mOutput.write(reinterpret_cast<const char*>(&m->mTextureCoords[c][i].x), 6); mOutput.write(reinterpret_cast<const char*>(&m->mTextureCoords[c][i].x), 8);
} }
else { else {
mOutput.write(reinterpret_cast<const char*>(&defaultUV.x), 6); mOutput.write(reinterpret_cast<const char*>(&defaultUV.x), 8);
} }
} }