Error Handling and Build System Change
Release 0.7.5
SuperTest+
- Fix an integer underflows issue when line is wider than the console width in
STPConsoleReporter. - Add a smart text wrapper for the consoel reporter.
- Add test for free-slip utilities.
General fixes and improvement
Exception handling
- Simplify exception handling in some classes to ensure there's only one try-catch block in one function. If exception can be thrown out safely without the need to clear memory, try-catch block is removed.
- Avoid throwing exception in the destructor, and instead terminate the program.
- Replace
exit(-1)withstd::terminate(). - Add a new exception class
STPInvalidEnvironmentwhich is thrown whenSTPEnvironmentis not validated at the constructors ofSTPChunkProvider,STPHeightfieldGeneratorandSTPermutationGenerator. - Add numeric range check for functions in
STPChunk. - Add size check in
STPMemoryPoolandSTPFreeSlipGeneratorto make sure the numbers provided are positive. - Add input value range check for
STPFreeSlipTextureBuffer.
File system change
- Move free-slip utilites into a separate folder GPGPU/FreeSlip.
- Re-style include directories. Header should prefer using double quotes while sources prefer using angle brackets. Replace system header includes with angled brackets.
- Replace the following external libraries with imported package, and remove them from the
Externaldiectory:- glfw3
- glm
- OpenGL
- SIMPLE
Out final goal is to replace all explicit include directories with CMake imported targets via CMake find_package().
- Change
GLADbuild type to share library. This is beneficial for sharing OpenGL contexts between the main engine and demo application.
Others
- Remove checker for disabled free-slip hydraulic erosion and return nullptr if so. It's generally un-safe and adds more overhead during run-time to check for null pointer.
- Use
emplace_back()instead ofpush_back()forgetRegion()inSTPChunk. - Address changes brought by
SIMPLE v2.0.