gltf icon indicating copy to clipboard operation
gltf copied to clipboard

Stop computing the glb length in the example

Open wlinna opened this issue 4 years ago • 1 comments

to_writer computes the length internally, and the length provided in the header is ignored. Thus computing it yourself only adds complexity.

wlinna avatar Aug 01 '21 12:08 wlinna

Hello, thanks! It feels a bit weird to have a random zero in the middle of an example. IMO we should either add a comment to explain that length is recomputed anyways thus we can set the header length to whatever, or add an impl Default for Header. There's no much room for changing anything in the header:

  • magic: Must be b"glTF".
  • version: Must be 2.
  • length: is ignored most of the time ?

IcanDivideBy0 avatar Jan 27 '22 08:01 IcanDivideBy0