File format loader fixes #237
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.
Nice to see security enhancements)
Although I tried to be careful testing is welcome to check that I didn't accidentally break any valid models.
Isn’t that what unit tests are for?
True. |
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.
It would be good to value-init headers before reading them, e.g. in the BMP loader, for the case read() doesn't read a full header.
We should at some point replace some of these loaders with libraries, e.g. sdl2_image
for images.
Haven't tested. Unittests would be good.
Even when an error was encountered ::load() would still attempt to assemble the mesh, this was a pretty big problem.
I gave up on the .x loader since there's too many bugs (there are remaining ones).
Although I tried to be careful testing is welcome to check that I didn't accidentally break any valid models.