jpaoneMines / csci441

CSCI441 Library Helper Functions and Classes
MIT License
5 stars 2 forks source link

resolves #15 #20

Closed qtf0x closed 1 year ago

qtf0x commented 1 year ago

Ensures that only single-precision floats are being used in all cases. This includes in places where it really doesn't matter; worst case the compiler does fewer implicit type-casts, best case we (extremely) marginally reduce memory overhead.

I don't have an M1 Mac to test this on, but I've tested to make sure everything functions the same as before on Windows and Linux.

To ensure cross-compatibility (that floats are really single-precision on all machines), all math is now handled by glm (a pretty small change). This includes trigonometric and exponential functions, the pi constant, and floating point comparisons.

Also fixes a small bug in ModelLoader.hpp where the variable AUTO_GEN_NORMALS had been moved inside the ModelLoader class but not refactored properly (the file did not compile).