Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix and rename mergeIndices() #2772

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Conversation

cloudwu
Copy link
Contributor

@cloudwu cloudwu commented Apr 18, 2022

Sorry, there is still a bug in #2769 . Fixed it.

And rename mergeIndices() to rearrangeIndices() .

The details about rearrangeIndices() :

The original indices are

0 1 2 3 4 5 3 4 6

If bgfx:weldVertices() merge vertex 3 to 1, an 4 to 2 , the indices would be

0 1 2 1 2 5 1 2 6

rearrangeIndices() rearrange these indices to

0 1 2 1 2 3 1 2 4

(5 to 3, 6 to 4)

@cloudwu cloudwu requested a review from bkaradzic as a code owner April 18, 2022 07:51
@@ -65,15 +65,13 @@ class ExampleBunnyLOD : public entry::AppI
}
}

static void mergeIndices(uint32_t* _indices, uint32_t _num)
static void rearrangeIndices(uint32_t* _indices, uint32_t _num)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common term is usually remap so remapIndices?

@bkaradzic bkaradzic merged commit c6d66c2 into bkaradzic:master Apr 18, 2022
mipek pushed a commit to mipek/bgfx that referenced this pull request Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants