habitat-sim
habitat-sim copied to clipboard
Update to latest Magnum and use the new text rendering APIs
Motivation and Context
Depends on / based off #2573, which fixes one CI error.
Regular, 36th Magnum update. Main change is adapting to the new text rendering APIs, both in the C++ and Python code. Besides that:
- Fixed various warnings and misoptimization(?) issues happening with the new GCC 15
std::string-taking APIs in the Utility::String namespace are soon to be deprecated as all that functionality is available directly on Containers::StringView. While the deprecation markers are not in Corrademasteryet, I updated Habitat code to not use those anymore.- Two new workarounds for NVidia GL driver bugs, one of them affecting just Ada Generation GPUs but in a rather nasty way
- New Color4::premultiplied() and Color4::unpremultiplied() helpers to convert a RGBA color to a premultiplied form and back
- Vector::isZero() is now made to be equivalent to comparing to a zero-initialized vector, instead of having a significantly larger epsilon threshold, to avoid nasty surprises
- Color literals such as
0xff3366_rgbfnow check at compile time that you pass exactly the amount of components needed for a RGB or RGBA color, preventing common errors. For example,0xff3366_rgbafwouldn't compile anymore, and neither would0xff3366aa_rgbf. - Added Platform::GlfwApplication::isKeyPressed() / platform.glfw.Application.is_key_pressed() for immediate key state queries. I went through the C++ and Python apps in Habitat and ported the code to use this new API, removing the manual state caching code.
- Recognizing and delegating
*.usdfiles to AssimpImporter, which has opt-in support for those since version 5.4.3. - Further workarounds to make OpenExrImporter work with OpenEXR 3.3.3
- Further workarounds to make the code compile against latest glslang from Homebrew
- Preventing an assertion in GltfImporter when opening files with excessive amount of morph targets
- New LunaSvgImporter, PlutoSvgImporter and ResvgImporter plugins in case you'd want to load and display SVG files
- platform.glfw.Application.Configuration can now be constructed by passing the config options as kwargs to the constructor, allowing to init the application with a single expression. I updated the Habitat Python app code to use this.
- There's finally platform.glfw.Application.Configuration.WindowFlags.FULLSCREEN, I think @0mdc you asked for this ages ago?
How Has This Been Tested
:green_apple:
:warning: Note: I compiled and ran the C++ viewer locally, unfortunately I'm not able to test that my changes to the Python apps work as well. But I tried my best, used m.css-generated stubs for Magnum Python bindings in the IDE to spot typos, etc. Can you check those for me? @0mdc? Thanks.
:thinking: Apart from the CMake version error on the build_conda_osx job that's fixed by #2573, I have no idea what's up with the other conda job.