Closed cwfitzgerald closed 4 years ago
Rebased onto master.
The merged PR came with failures, unfortunately - https://travis-ci.org/github/kvark/obj/jobs/676781512 Could we address them here?
Eh that's what I get for not running tests with all features. Fixed.
Depends on #12. Only the last commit is relevant to this PR, will rebase once #12 is merged.
For complicated reasons, I need to be able to preprocess MTL files before the OBJ loader loads them. These files may also be at a different location than the obj loader expects. To facilitate this, I added a function
Obj::load_mtls_fn
that takes a callback which takes the base_path for the obj and the name of the mtl and returns something that implementsio::BufRead
I don't think this should be a breaking change as the semantics and api of
Obj::load_mtls
should be identical (same code, just run with a layer of indirection) and adding a function is not a breaking change.