| 382 | } |
| 383 | |
| 384 | s32 parse(Mesh &m, Buffer &buf, CompileOptions &opts) |
| 385 | { |
| 386 | TempAllocator4096 ta; |
| 387 | JsonObject nodes(ta); |
| 388 | JsonObject obj(ta); |
| 389 | RETURN_IF_ERROR(sjson::parse(obj, buf)); |
| 390 | |
| 391 | s32 err = mesh::parse_geometries(m, obj["geometries"], opts); |
| 392 | ENSURE_OR_RETURN(MESH_RESOURCE, err == 0, opts); |
| 393 | |
| 394 | return mesh::parse_nodes(m, obj["nodes"], opts); |
| 395 | } |
| 396 | |
| 397 | } // namespace mesh |
| 398 |
no test coverage detected