Merge pull request #2858 from malortie/uv-coordinates-swapped-twice

Fixed UV coordinate swapped twice in big endian.
pull/2820/head^2
Kim Kulling 2020-01-01 14:03:52 +01:00 committed by GitHub
commit 2620f4a536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -973,7 +973,7 @@ void MD3Importer::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
AI_SWAP2( pcVertices[i].Z );
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) {
AI_SWAP4(pcTriangles[i].INDEXES[0]);

View File

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