Browse Source

Fixed UV coordinate swapped twice in big endian.

Marc-Antoine Lortie 5 years ago
parent
commit
6de5ff8f7d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      code/MD3/MD3Loader.cpp
  2. 1 1
      code/MDC/MDCLoader.cpp

+ 1 - 1
code/MD3/MD3Loader.cpp

@@ -973,7 +973,7 @@ void MD3Importer::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
             AI_SWAP2( pcVertices[i].Z );
             AI_SWAP2( pcVertices[i].Z );
 
 
             AI_SWAP4( pcUVs[i].U );
             AI_SWAP4( pcUVs[i].U );
-            AI_SWAP4( pcUVs[i].U );
+            AI_SWAP4( pcUVs[i].V );
         }
         }
         for (uint32_t i = 0; i < pcSurfaces->NUM_TRIANGLES;++i) {
         for (uint32_t i = 0; i < pcSurfaces->NUM_TRIANGLES;++i) {
             AI_SWAP4(pcTriangles[i].INDEXES[0]);
             AI_SWAP4(pcTriangles[i].INDEXES[0]);

+ 1 - 1
code/MDC/MDCLoader.cpp

@@ -355,7 +355,7 @@ void MDCImporter::InternReadFile(
         // swap all texture coordinates
         // swap all texture coordinates
         for (unsigned int i = 0; i < pcSurface->ulNumVertices;++i)
         for (unsigned int i = 0; i < pcSurface->ulNumVertices;++i)
         {
         {
-            AI_SWAP4( pcUVs->v );
+            AI_SWAP4( pcUVs->u );
             AI_SWAP4( pcUVs->v );
             AI_SWAP4( pcUVs->v );
         }
         }