Compare commits

...

2 Commits

Author SHA1 Message Date
bjorn 3dd641c02d Undo accidental jolt submodule bump; 2024-04-04 17:31:42 -07:00
bjorn 01a0df37cc Fix OBJ triangulation for faces with more than 4 vertices; 2024-04-04 17:28:05 -07:00
1 changed files with 1 additions and 1 deletions

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;
}