| 3192 | } |
| 3193 | |
| 3194 | bool ObjReader::ParseFromString(const std::string &obj_text, |
| 3195 | const std::string &mtl_text, |
| 3196 | const ObjReaderConfig &config) { |
| 3197 | std::stringbuf obj_buf(obj_text); |
| 3198 | std::stringbuf mtl_buf(mtl_text); |
| 3199 | |
| 3200 | std::istream obj_ifs(&obj_buf); |
| 3201 | std::istream mtl_ifs(&mtl_buf); |
| 3202 | |
| 3203 | MaterialStreamReader mtl_ss(mtl_ifs); |
| 3204 | |
| 3205 | valid_ = LoadObj(&attrib_, &shapes_, &materials_, &warning_, &error_, |
| 3206 | &obj_ifs, &mtl_ss, config.triangulate, config.vertex_color); |
| 3207 | |
| 3208 | return valid_; |
| 3209 | } |
| 3210 | |
| 3211 | #ifdef __clang__ |
| 3212 | #pragma clang diagnostic pop |