Skip parsing incomplete or invalid face definition(e.g. f definition only contains 1 or 2 indices).

This commit is contained in:
Syoyo Fujita
2018-02-23 20:25:13 +09:00
parent e060b4f4aa
commit b85714b4cf
4 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
mtllib invalid-face-definition.mtl
v 0.000000 2.000000 2.000000
v 0.000000 0.000000 2.000000
v 2.000000 0.000000 2.000000
v 2.000000 2.000000 2.000000
v 0.000000 2.000000 0.000000
v 0.000000 0.000000 0.000000
v 2.000000 0.000000 0.000000
v 2.000000 2.000000 0.000000
# 8 vertices
g front cube
usemtl white
f 1
g back cube
# expects white material
f 8 7