Skip to content

screw up obj files indices and vetices when trying to index an unindexed one #372

Answered by zeux
Abdelilah-Majid asked this question in Q&A
Discussion options

You must be logged in to vote

Please refer to something like this as an example: https://github.com/zeux/meshoptimizer/blob/master/demo/main.cpp#L128-L136

In your code one thing that stands out immediately is that you're passing sizeof(float) as vertex size, whereas instead you should be passing the size of the entire vertex - which is typically at least 12 bytes (3 floats), but here likely to be more.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Abdelilah-Majid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #371 on November 21, 2021 22:52.