In the Serialization example main.cpp
perhaps it worths changing
std::vector<uint16_t> indices;
to
std::vector<uint32_t> indices;
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
In the Serialization example main.cpp
perhaps it worths changing
std::vector<uint16_t> indices;
to
std::vector<uint32_t> indices;
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