tinygltf
tinygltf copied to clipboard
Store texture as map?
https://github.com/syoyo/tinygltf/blob/edf8d5cae1eb69376832da69b1e06e5f4daf3740/tiny_gltf.h#L809
The "TODO" in glview.cc seems difficult/impossible unless the textures are stored as an associated container... should the definition of Model be given maps instead of vectors for some cases?
tinygltf/examples/glview/glview.cc:424
In a glTF asset, everything is actually stored as arrays.
Material refer to texture as their index in the "texture" array. This kind of storage makes sense for tinygltf. Same goes for a texture source, it's an image.
Exactly the same for accessing all the binary data. Node -> Mesh -> accessor(s) -> bufferView -> buffer.
Each of these "->" is just an index in the corresponding array.
Hope this helps!
@pkarasev3-tri which "TODO" are you referring to exactly?