gltf
gltf copied to clipboard
`Accessor` implementation not conformant with specification
-
The
Validate
implementation assertsbuffer_view
andsparse
must not both be empty, which is actually allowed. -
The
Accessor
always hasbyte_offset
even whenbuffer_view
is none, which is not allowed.
I just encountered this when trying to implement MSFT_lod
with #348. The exact wording of the spec is:
The index of the buffer view. When undefined, the accessor MUST be initialized with zeros;
sparse
property or extensions MAY override zeros with actual values.
Therefore these lines should be removed:
https://github.com/gltf-rs/gltf/blob/51d8f5c5e9fde2740f1da83d248b26f6b8d015c8/gltf-json/src/accessor.rs#L233-L237