LoadGLBBuffers depricated? #96
Replies: 1 comment 5 replies
-
|
The simdjson API doesn't allow me to parse JSON on the fly in the sense that I can't load the file piece by piece into memory and parsing individual chunks at a time. Therefore the whole file needs to be loaded into memory before parsing can begin. This is fine with .gltf files that are only made up of JSON. However, with GLB it is hard to implement an interface that conveys the information where the JSON is in the file, since the parser needs to know about the chunk headers before and after the JSON chunk. And since I want to support virtual file systems and other niches I cannot just take in a std::FILE* or std::ifstream. I decided to just not do that, and instead to just always put the entire file into memory including the GLB data, since (1) it makes the parsing code & interface a lot simpler, and allows for validation, and (2) the GLB will need to be loaded regardless. I am aware that this is suboptimal, and I am interested in suggestions on how I could make this better. So for now the option is deprecated/ignored since it's the default behaviour. All other buffers/images are still not loaded by default, though, this only affects the optional embedded buffer. I hope you understand the design idea I'm trying to get at and why certain things block me from efficiently implementing a system that would only load the GLB without the buffer. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently evaluating the fastgltf library and wanted to express my appreciation for the great work you've done on making GLTF parsing fast and efficient.
While exploring the API, I noticed that the LoadGLBBuffers option has been marked as deprecated. I understand that APIs evolve over time, but I wanted to mention that this specific functionality, controlling the loading of binary buffer data, was exactly what I was looking for in my use case.
Would you be open to sharing the reasoning behind the deprecation, or perhaps suggest an alternative approach for achieving similar behavior with the current version of the API?
Beta Was this translation helpful? Give feedback.
All reactions