Browse Source

Fix quad+ fan (incorrectly updated the original code)

Godzil 3 years ago
parent
commit
d4dc568dfa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/mesh.c

+ 1 - 1
source/mesh.c

@@ -354,7 +354,7 @@ int objFileLoaderExecuteLine(int argc, char *argv[], uint32_t currentLine)
             /* This is not a triangle, so we need to fan it */
             for(i = 2; i < (argc - 1); i++)
             {
-                face_t face = { v[1], v[2], v[3] };
+                face_t face = { v[1], v[i], v[i + 1] };
                 arrayAdd(mesh.faces, face);
 
                 objFileLoaderTotalTri++;