| 1142 | } |
| 1143 | |
| 1144 | static void LoadMeshes(Scene* scene, cgltf_data* gltf_data) |
| 1145 | { |
| 1146 | InitSize(scene->m_Models, gltf_data->meshes_count, gltf_data->meshes_count); |
| 1147 | |
| 1148 | for (uint32_t i = 0; i < gltf_data->meshes_count; ++i) |
| 1149 | { |
| 1150 | cgltf_mesh* gltf_mesh = &gltf_data->meshes[i]; // our "Model" |
| 1151 | Model* model = &scene->m_Models[i]; |
| 1152 | model->m_Name = DuplicateObjectName(gltf_mesh); |
| 1153 | model->m_Index = i; |
| 1154 | |
| 1155 | LoadPrimitives(scene, model, gltf_data, gltf_mesh); // Our "Meshes" |
| 1156 | } |
| 1157 | } |
| 1158 | |
| 1159 | |
| 1160 | // If the mesh wasn't skinned, but uses same material as other skinned meshes, we need to create a duplicate |
no test coverage detected