I am trying to load a Wavefront Object into my C++ OpenGL program using my own parser. The parser works for some .obj-files, but at some files it throws an index out of range exception
. After some debugging I recognized that one line in the file references a vertex with the number 10565
:
f 2571/5164/4481 8298/5166/4481 10565/5167/4481
^^^^^
But the file only contains 10531
vertices.
Questions:
I had to remove the duplicate vertices.