Fix mis-counting of faces when triangulation is enabled.

This commit is contained in:
Syoyo Fujita
2018-08-20 15:10:37 +09:00
parent 1f17833657
commit c9b1bccf97

View File

@@ -1685,7 +1685,8 @@ bool parseObj(attrib_t *attrib, std::vector<shape_t> *shapes,
} }
} }
if (commands[t][i].type == COMMAND_F) { if (commands[t][i].type == COMMAND_F) {
face_count++; // Consider generation of multiple faces per `f` line by triangulation
face_count += commands[t][i].f_num_verts.size();
} }
} }
} }