소스 검색

Fix texture coords exporting on binary PLY files

mpersano 9 년 전
부모
커밋
473d2ca052
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      code/PlyExporter.cpp

+ 2 - 2
code/PlyExporter.cpp

@@ -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) {
             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 {
-                mOutput.write(reinterpret_cast<const char*>(&defaultUV.x), 6);
+                mOutput.write(reinterpret_cast<const char*>(&defaultUV.x), 8);
             }
         }