| 362 | } |
| 363 | |
| 364 | static bool ReadSparseIndex(const uint8_t* data, cgltf_component_type component_type, cgltf_size* out) |
| 365 | { |
| 366 | switch (component_type) |
| 367 | { |
| 368 | case cgltf_component_type_r_8u: |
| 369 | *out = *data; |
| 370 | return true; |
| 371 | case cgltf_component_type_r_16u: |
| 372 | { |
| 373 | uint16_t value; |
| 374 | memcpy(&value, data, sizeof(value)); |
| 375 | *out = value; |
| 376 | return true; |
| 377 | } |
| 378 | case cgltf_component_type_r_32u: |
| 379 | { |
| 380 | uint32_t value; |
| 381 | memcpy(&value, data, sizeof(value)); |
| 382 | *out = value; |
| 383 | return true; |
| 384 | } |
| 385 | default: |
| 386 | return false; |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | static bool ValidateSparseAccessorsForUnpack(Scene* scene, cgltf_data* data) |
| 391 | { |
no outgoing calls
no test coverage detected