Open jimver04 opened 1 year ago
I'm not sure I understand. Why does it make more sense to use a larger index type to store the indices when the smaller type works? Maybe a comment would suffice?
Yes a comment would be nice there to point out that these should be changed according to the size of data, i.e. when the number of vertices > 65536
Please open a PR. I will review and merge.
Is this still needed?
In the Serialization example main.cpp
perhaps it worths changing
std::vector indices; indices;
to
std::vector
and
accessorIdIndices = bufferBuilder.AddAccessor(indices, { Microsoft::glTF::TYPE_SCALAR, Microsoft::glTF::COMPONENT_UNSIGNED_SHORT}).id;
to
accessorIdIndices = bufferBuilder.AddAccessor(indices, { Microsoft::glTF::TYPE_SCALAR, Microsoft::glTF::COMPONENT_UNSIGNED_INT}).id;
because it took me days to figure out why it was not working with my data. Some meshes had more than 2^16 vertices and were scrumbled whereas some other meshes were ok.
Best, Dimitrios