jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

Change error code on sampler count mismatch to invalid_gltf #242

Closed zeux closed 7 months ago

zeux commented 7 months ago

This error as it stands is a little misleading: it's the only case where we emit an error like this when the sizes aren't equal, so it can hit when the output count is larger (so there's technically enough data, but the glTF file is still invalid per spec / per Khronos validator). In other cases where a size mismatches like this we currently emit invalid_gltf so this seems to make more sense.

zeux commented 7 months ago

The build error was unrelated to the PR (glTF-Sample-Models changed from master to main) but it was just one line to fix so I fixed it in this PR as it would need that fix to become green anyway.