small primer for those who don't yet already know, glTF is a format that comes in a couple different deliverable flavours, and i'm specifically talking about the GLTF_SEPARATED mode, where the .gltf is a JSON file, it comes with one or more .bin files accompanying it. The content of the .bin is effectively the raw buffers you'd pass into a generated buffer, and in the json file is a structure of “accessors” that inform you which datatype is expected, which .bin to use, and the exact byte offset and data length to use to feed your buffer. It's a really neat and very clever file format that if this is your first time hearing about it, worth checking out for your next project.
okay with that all out of the way, this is my first time implementing this file type. And up until now i've really only parsed text based file formats before. The .bin files are the part that has me puzzled over which direction to take with it.
I've been informed I can simply stream in only the data I care about using the offset and length to do so, and spit that wholesale into the buffer as needed.
I've also been informed that another approach is to simply read in the whole bin file(s) into memory, as undoubtably it's all going to get used anyways, and extract the portions out that I need that way.
My question I'm posing here is, because i'm teeter-tottering over it, which approach seems like the better one?
or is there an even better approach than those two?
Thanks!