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:
parent
ecbd331552
commit
01a0df37cc
2
deps/jolt-physics-sharp
vendored
2
deps/jolt-physics-sharp
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 29fe07e8088279c47d7108107856ec3c826d1817
|
||||
Subproject commit d7cb11ddb7014a2a39be9aeede34d490a69ee88f
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue