Commit 7c5d74e
authored
Fixing an OBJ loader bug that fragmented the loaded meshes (#4494)
The nextShapeEnd integer is a pointer in the OBJ data structures.
The faceVertIndex is a vertex index counter for the mesh we are
about to create. Both integers are not compatible, which causes
the code to finish the meshes too early, thus writing the OBJ data
incompletely into the target meshes.
It wasn't noticed because for the last mesh, it process all remaining
data, causing the last mesh to contain all remaining triangles.
This would have been noticed if the OBJ meshes used different textures
for each mesh.1 parent 4f091f4 commit 7c5d74e
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4244 | 4244 | | |
4245 | 4245 | | |
4246 | 4246 | | |
4247 | | - | |
| 4247 | + | |
4248 | 4248 | | |
4249 | 4249 | | |
4250 | 4250 | | |
| |||
4295 | 4295 | | |
4296 | 4296 | | |
4297 | 4297 | | |
4298 | | - | |
| 4298 | + | |
4299 | 4299 | | |
4300 | 4300 | | |
4301 | 4301 | | |
| |||
4357 | 4357 | | |
4358 | 4358 | | |
4359 | 4359 | | |
4360 | | - | |
| 4360 | + | |
4361 | 4361 | | |
4362 | 4362 | | |
4363 | 4363 | | |
| |||
0 commit comments