Bladeren bron

Fix OBJ output when vertex data has all of pos/uv/normal.

Lasse Öörni 10 jaren geleden
bovenliggende
commit
315115295b
1 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 6 6
      Source/Urho3D/Graphics/Drawable.cpp

+ 6 - 6
Source/Urho3D/Graphics/Drawable.cpp

@@ -551,13 +551,13 @@ bool WriteDrawablesToOBJ(PODVector<Drawable*> drawables, File* outputFile, bool
                         {
                         {
                             output.AppendWithFormat("%l/%l/%l %l/%l/%l %l/%l/%l",
                             output.AppendWithFormat("%l/%l/%l %l/%l/%l %l/%l/%l",
                                 currentPositionIndex + longIndices[0],
                                 currentPositionIndex + longIndices[0],
-                                currentPositionIndex + longIndices[0],
-                                currentPositionIndex + longIndices[0],
-                                currentUVIndex + longIndices[1],
-                                currentUVIndex + longIndices[1],
+                                currentUVIndex + longIndices[0],
+                                currentNormalIndex + longIndices[0],
+                                currentPositionIndex + longIndices[1],
                                 currentUVIndex + longIndices[1],
                                 currentUVIndex + longIndices[1],
-                                currentNormalIndex + longIndices[2],
-                                currentNormalIndex + longIndices[2],
+                                currentNormalIndex + longIndices[1],
+                                currentPositionIndex + longIndices[2],
+                                currentUVIndex + longIndices[2],
                                 currentNormalIndex + longIndices[2]);
                                 currentNormalIndex + longIndices[2]);
                         }
                         }
                         else if (hasNormals || hasUV)
                         else if (hasNormals || hasUV)