1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-08 15:13:35 +00:00

Fix OBJ triangulation for faces with more than 4 vertices;

This commit is contained in:
bjorn 2024-04-04 17:28:05 -07:00
parent ecbd331552
commit 01a0df37cc
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 29fe07e8088279c47d7108107856ec3c826d1817
Subproject commit d7cb11ddb7014a2a39be9aeede34d490a69ee88f

View file

@ -197,7 +197,7 @@ ModelData* lovrModelDataInitObj(ModelData* model, Blob* source, ModelDataIO* io)
// Triangulate faces (triangle fan)
if (i >= 3) {
arr_push(&indexBlob, indexBlob.data[indexBlob.length - i]);
arr_push(&indexBlob, indexBlob.data[indexBlob.length - (3 * (i - 2))]);
arr_push(&indexBlob, indexBlob.data[indexBlob.length - 2]);
group->count += 2;
}