| 62 | } |
| 63 | |
| 64 | static s32 parse_scene(OBJDocument &obj, Buffer &buf, CompileOptions &opts, const char *filename) |
| 65 | { |
| 66 | ufbx_load_opts load_opts = {}; |
| 67 | setup_load_opts(load_opts, filename); |
| 68 | |
| 69 | ufbx_error error; |
| 70 | obj.scene = ufbx_load_memory(array::begin(buf) |
| 71 | , array::size(buf) |
| 72 | , &load_opts |
| 73 | , &error |
| 74 | ); |
| 75 | RETURN_IF_FALSE(OBJ_RESOURCE, obj.scene != NULL |
| 76 | , opts |
| 77 | , "ufbx: %s" |
| 78 | , error.description.data |
| 79 | ); |
| 80 | |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | static void generate_indices(Array<u32> &triangle_indices, Array<f32> &vertex_data, size_t vertex_size) |
| 85 | { |
no test coverage detected