| 3493 | } |
| 3494 | |
| 3495 | bool ObjReader::ParseFromString(const std::string &obj_text, |
| 3496 | const std::string &mtl_text, |
| 3497 | const ObjReaderConfig &config) { |
| 3498 | std::stringbuf obj_buf(obj_text); |
| 3499 | std::stringbuf mtl_buf(mtl_text); |
| 3500 | |
| 3501 | std::istream obj_ifs(&obj_buf); |
| 3502 | std::istream mtl_ifs(&mtl_buf); |
| 3503 | |
| 3504 | MaterialStreamReader mtl_ss(mtl_ifs); |
| 3505 | |
| 3506 | valid_ = LoadObj(&attrib_, &shapes_, &materials_, &warning_, &error_, |
| 3507 | &obj_ifs, &mtl_ss, config.triangulate, config.vertex_color); |
| 3508 | |
| 3509 | return valid_; |
| 3510 | } |
| 3511 | |
| 3512 | #ifdef __clang__ |
| 3513 | #pragma clang diagnostic pop |