Skip to content

Changes - suggestion for the Serialization example #110

Description

@jimver04

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions