6 ms·
Note that there's a great C99/C++ single header library, tinyobjloader, that provides robust (in my experience) and feature-full OBJ loading, including triangul
by tylermw 2y ago
Note that there's a great C99/C++ single header library, tinyobjloader, that provides robust (in my experience) and feature-full OBJ loading, including triangulation of n-gons and full material parsing.
https://github.com/tinyobjloader/tinyobjloader https://github.com/tinyobjloader/tinyobjloader
It's fairly mature and handles many of the parsing footguns you'll inevitably run into trying to write your own OBJ parser.
- unwind 2y agoThanks! I had a look at the code and it looked distinctly like C++, but it turns out there is a C version [1] too. Haven't looked into it further. [1]: https://github.com/syoyo/tinyobjloader-c https://github.com/syoyo/tinyobjloader-c