-
Notifications
You must be signed in to change notification settings - Fork 74
Add KHR_physics_rigid_bodies #95
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all big thanks. Don't have much to say yet, but one thing I will mention is that the if/else/for style is wildly inconsistent, most often with no space after an if/for, and sometimes with a newline before an else. While I generally don't care about the style contributors use (you'll find a few different styles throughout the codebase), I'd still like the individual commits/PRs to be as consistent as possible, and at best stick to the general codestyle.
spnda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went over this quickly, most of it looks good. I'll do an in depth review when you have added some testing code, so I can test locally too. Perhaps I should really add some kind of fuzzer, since I'd assume there's only a handful of available assets with this extension.
Well apart from the comments I'd like to mention that your code doesn't use FASTGLTF_UNLIKELY and FASTGLTF_LIKELY much (except for the parts I guess you copy & pasted). Might look annoying, but I found them to make parsing a few percents quicker due to better codegen, in the cases where no errors are returned.
Also for the exporting code (sorry you had to go through that mess), single characters should always be 'x' and not a string.
…er code review fixes
spnda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I know the usage of likely/unlikely is sometimes wrong in my code, too, but it would be best to get it right here.
- There's a few issues around indentation, specifically inconsistency between tabs and spaces. I want to slowly switch to using tabs, without creating a commit changing thousands of lines.
- There's probably still a few things I missed, but the fact the tests succeed everywhere is a good sign. Will need to review the tests in a bit more detail soon, so I know that everything is covered.
Adds support for the draft KHR_physics_rigid_bodies extension, and KHR_implicit_shapes
The import code is decently well-tested and used in my game, the export code is a bit rougher