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

refactor index buffers creation #431

Merged
merged 4 commits into from
Apr 18, 2023
Merged

Conversation

Trass3r
Copy link
Contributor

@Trass3r Trass3r commented Apr 15, 2023

No description provided.

@Trass3r Trass3r force-pushed the indexbuffers branch 3 times, most recently from ab7e912 to ae191a9 Compare April 16, 2023 00:30
}

// remove trailing empty LODs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gem holder looks normal in the model viewer so not sure if it breaks something there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Though thinking again about how that code expects a sorted set of numbers I'm not sure why it works at all, resp. doesn't fail horribly.

use i8 buffers instead of i32 to save memory
avoid creating empty LOD buffers
use a List instead of a HashMap
@tonihele
Copy link
Owner

tonihele commented Apr 17, 2023

Looks good to me. Is this only to fix the tangent generation warning (and bad data)? Was there anything else to this?

@Trass3r
Copy link
Contributor Author

Trass3r commented Apr 17, 2023

It started simple by noticing we create int32 index buffers even though the source data is only int8.
But it opened the whole can of worms with the LOD system etc.
So I guess I'll try to keep this small, as a cleanup that shouldn't change any observable behavior.

One more thing we could add to the naming improvements is taking the mesh name from the filename instead of the string saved in the kmf which is off for many MESH files. But we can also just leave it for now.

@Trass3r Trass3r mentioned this pull request Apr 17, 2023
@tonihele tonihele merged commit f363174 into tonihele:master Apr 18, 2023
@Trass3r Trass3r deleted the indexbuffers branch April 18, 2023 18:09
@tonihele tonihele mentioned this pull request Apr 22, 2023
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