Can't Open Other OBJ Files
These lessons work very well for the sample OBJ files that you provide, but I'm having trouble loading in other OBJ files. I pulled a few from https://groups.csail.mit.edu/graphics/classes/6.837/F03/models/ and they either threw segmentation faults or drew the geometry completely wrong.
I managed to figure out the problem! Model.cpp has this line of code when reading a face from an OBJ file (line starting with "f").
while (iss >> idx >> trash >> itrash >> trash >> itrash)
Meaning it expects 4 characters after each index, specifically a slash followed by a number followed by a slash followed by another number. But not all OBJ files define vt's and vn's so some define faces like this:
f 2227 2077 2049
I changed the code to do this instead:
while (iss >> idx)
and it worked, but ideally it'd be able to handle either format. Will keep looking...
Proof that I could render those sample models:
