qmuntal / gltf

Go library for encoding glTF 2.0 files
https://www.khronos.org/gltf/
BSD 2-Clause "Simplified" License
242 stars 32 forks source link

Is there enough ensurePadding? #32

Closed aoisensi closed 3 years ago

aoisensi commented 3 years ago

Hello. I'm new at gltf.

https://github.com/qmuntal/gltf/blob/6f371950e7fa5384366436658da419b8f27ee3ce/modeler/write.go

I read the code. I think almost every modeler's Write* method needs to have ensurePadding. The lack of it produces poor results in my converter. Thanks for reading. Sorry for bad English.

qmuntal commented 3 years ago

Hi @aoisensi, thanks for reporting your issue.

The only Write* methods that don´t have ensurePadding are WriteImage and WriteBufferView. Are you using refering to any of those two functions?

Also, could you share some lines of code to reproduce your issue?

aoisensi commented 3 years ago

Thank you for quick response. First, that was my bad! I tried write position with WriteBufferView. And maybe, my browser was broken. (Ctrl+F ensurePadding was only 2 results.) I’m using WritePosition now and solved. I'm sorry to build the useless issue. And thank you for writing beautiful library!