Skip to content

Conversation

panxinmiao
Copy link
Contributor

Close #723

Note: imgui 1.92 introduced some changes to font-related functionality, and downstream projects, as well as some examples in pygfx, may need to be adapted accordingly by following the official guidelines.

@panxinmiao panxinmiao requested a review from Korijn as a code owner July 10, 2025 06:53
@almarklein
Copy link
Member

How hard would it be to (temporarily) support both imgui < 1.92 and imgui >= 1.92? Some upstream libs have now pinned imgui to < 1.92.

@almarklein
Copy link
Member

Or we can decide to pin imgui = ["imgui-bundle>=1.92, <1.93"]

@panxinmiao
Copy link
Contributor Author

How hard would it be to (temporarily) support both imgui < 1.92 and imgui >= 1.92? Some upstream libs have now pinned imgui to < 1.92.

Maintaining compatibility with both versions at the same time shouldn’t be too complicated — I’ll take a look.

@panxinmiao
Copy link
Contributor Author

How hard would it be to (temporarily) support both imgui < 1.92 and imgui >= 1.92? Some upstream libs have now pinned imgui to < 1.92.

Since some logic of ImguiWgpuBackend has changed, I think the simplest solution is to keep two versions of ImguiWgpuBackend and dynamically import the appropriate one based on the version of imgui_bundle.

What do you think? @almarklein @kushalkolar
Do you think it's necessary to maintain both versions like this?

@kushalkolar
Copy link
Contributor

That was fast, @panxinmiao you are awesome 🎉

@kushalkolar
Copy link
Contributor

How hard would it be to (temporarily) support both imgui < 1.92 and imgui >= 1.92? Some upstream libs have now pinned imgui to < 1.92.

Since some logic of ImguiWgpuBackend has changed, I think the simplest solution is to keep two versions of ImguiWgpuBackend and dynamically import the appropriate one based on the version of imgui_bundle.

What do you think? @almarklein @kushalkolar Do you think it's necessary to maintain both versions like this?

It seems like imgui-bundle v1.92 has wheels for python 3.11-313 on all major platforms, the same as imgui-bundle v1.6.4.

BTW there is pypodide support too now which will be great for the future 😄

@panxinmiao
Copy link
Contributor Author

@kushalkolar I've updated the imgui_cmap_picker.py example.

@almarklein
Copy link
Member

How hard would it be to (temporarily) support both imgui < 1.92 and imgui >= 1.92? Some upstream libs have now pinned imgui to < 1.92.

Since some logic of ImguiWgpuBackend has changed, I think the simplest solution is to keep two versions of ImguiWgpuBackend and dynamically import the appropriate one based on the version of imgui_bundle.

What do you think? @almarklein @kushalkolar Do you think it's necessary to maintain both versions like this?

If the differences are this significant, I think we should just bit the bullet and require the latest imgui version. Can you update pyproject to set imgui = ["imgui-bundle>=1.92, <1.93"]?

@almarklein
Copy link
Member

On second thought, let's assume the following few versions are compatible, and use imgui = ["imgui-bundle>=1.92, <2"]

@almarklein almarklein merged commit 8037a00 into pygfx:main Jul 15, 2025
20 checks passed
@almarklein
Copy link
Member

Thanks Pan!

@hmaarrfk
Copy link
Contributor

is this worth a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imgui v1.92.0 changes how font textures are handled
5 participants