Release 3.0.0
Changes
This release brings API breaking changes to tobj that add a number of optional features that can be valuable for offline rendering. A huge thanks goes to @virtualritz for implementing these features! These features are:
- Merging: Merge vertices with positions at the same spatial location (https://github.com/Twinklebear/tobj/blob/master/src/lib.rs#L355-L371)
- Reordering: Reorder the mesh normal and texcoord indices so that the indices match those used by the positions (this requires const generics, and a beta toolchain of Rust)
The API has also changed to default to not compute a single index, but to instead return separate indices for normals and texture coordinates (as also done in tinyobjloader). Setting the load options single_index
will provide the old behavior where vertex data may be duplicated to create unique vertices (https://github.com/Twinklebear/tobj/blob/master/src/lib.rs#L405-L423). For example, a rasterizer would typically set triangulate and single_index to true in the load options.
This release also resolves #30, which splits the load result into separate items for the OBJ file and the MTL file. This allows materials to fail to load without causing the entire mesh load to fail.