Closed AndrewJDR closed 4 years ago
Wonder if replacing the OBJ reader wholesale with https://github.com/syoyo/tinyobjloader should be done at the same time?
That is even better. The TootleSample was initially written as a simple example code for how to use the tootle library.
If the source obj file has more than one 'g ' line (mesh group), these will be handled strangely in the output obj. You'll end up with several contiguous group lines in the output with no faces defined within them, like so: g Group1 g Group2 g Group4
This is because TootleSample completely suppresses, re-orders, and re-prints all of the 'f ' lines in a separate pass, but still prints through the mesh group lines from the original file.
Some options: Just ignore / don't print 'g' lines at all in the output, and end up with one big mesh. (More complex) Optimize each mesh group separately so that faces don't get re-ordered across 'g ' boundaries.