Skip to content

Conversation

mosra
Copy link
Collaborator

@mosra mosra commented May 5, 2025

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 Corrade master yet, 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_rgbf now 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_rgbaf wouldn't compile anymore, and neither would 0xff3366aa_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 *.usd files 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

🍏

⚠️ 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.

🤔 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.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 5, 2025
@mosra mosra force-pushed the update-magnum36 branch from 695ae0d to 6d71c1c Compare May 5, 2025 09:37
CMake 4 removed compatibility with CMake <= 3.5, and the zstd version
had it still as the minimum. Updated to latest zstd 1.5.7 to fix that.
mosra added 10 commits May 5, 2025 12:08
Hopefully it didn't grow the bug zoo too much since 5.0.
The commit bumping to 3.5 (which is still too old) was just two weeks
ago: bulletphysics/bullet3@d1a4256
5.2.0 also fails to build due to a missing <cstddef> include, which is
fixed in 5.2.2. SIGH.
3.3.5, which is the oldest that has this fixed. Latest 3.4 relies on the
wayland-scanner executable which isn't installed on the CI, and I don't
want to deal with that as well.
All of those are now either available on Containers::StringView or they
don't have std::string overloads anymore. Ultimately all of these
changes should result in significantly less temporary string
allocations, especially with string splitting.
The output should look the same as before, it's just less annoying to
set up and more flexible now.
@mosra mosra force-pushed the update-magnum36 branch from 4fce765 to 28ad795 Compare May 5, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants