In a function that takes the current node as input argument, how can I find out the number of the "bufferView" belonging to it? In the gltf file the number is simply specified: «"accessors":[ { "bufferView":0» but the parser already refers to the "bufferView" itself (node->mesh->primitives->indices->buffer_view) and does not allow to find out its number in order to correctly refer to other data, e.g. "accessor", by this number. So far, I've done this:
int iBufferView = (node - data->scene->nodes[0]) * 4;
but I doubt it's fair to the children.
In a function that takes the current node as input argument, how can I find out the number of the "bufferView" belonging to it? In the gltf file the number is simply specified: «"accessors":[ { "bufferView":0» but the parser already refers to the "bufferView" itself (node->mesh->primitives->indices->buffer_view) and does not allow to find out its number in order to correctly refer to other data, e.g. "accessor", by this number. So far, I've done this:
int iBufferView = (node - data->scene->nodes[0]) * 4;
but I doubt it's fair to the children.