瀏覽代碼

Fix quad+ fan (incorrectly updated the original code)

Godzil 3 年之前
父節點
當前提交
d4dc568dfa
共有 1 個文件被更改,包括 1 次插入1 次删除
  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++;