Skip to content

Many breaking changes in imgui-bundle version 1.92.0 #222

@Tremeschin

Description

@Tremeschin

Hi, Imgui got a huge release past few days with many fonts related code changes, breaking ModernGL's Window integration in potentially many ways (the dependency is unbounded, semver allows the new one), yet seems to have simplified font management scaling quite a bit:

  • pthom/imgui-bundle release mainly removed font_atlas_get_tex_data_as_rgba32 and related functions.
  • ocornut/imgui lists all the many breaking changes in the C part, which imgui-bundle tries to mirror.

I tried bypassing these fonts functions but a fix goes wayy deeper (Linux) for moderngl-window==3.1.1:

  File "/home/tremeschin/Code/.venv/lib/python3.13/site-packages/moderngl_window/integrations/imgui_bundle.py", line 167, in refresh_font_texture
    font_matrix = self.io.fonts.get_tex_data_as_rgba32()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'imgui_bundle._imgui_bundle.imgui.ImFontAtlas' object has no attribute 'get_tex_data_as_rgba32'

The easiest solution is to limit or downgrade to imgui-bundle<=1.6.3 in our projects, but most use >= or ~= pins which makes it quite worrisome as the new "bad" version is semver-compatible with everyone's current specifications.

  • Workaround: Downgrade to python3 -m pip install imgui-bundle==1.6.3 --force-reinstall
  • Or better yet, uv add imgui-bundle==1.6.3, poetry add imgui-bundle==1.6.3, etc.

Perhaps @highfestiva could help porting to the new version as he's done PRs #197 #196 😅, might need to make the new code specific to imgui-bundle>=1.92.0 though, or branching based on version (ugly), as back compat seems to be hard.

I'm writing this in a semi-hurry for a patch release of my projects for pinning <=1.6.3, might update with further info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions