imgui_bundle icon indicating copy to clipboard operation
imgui_bundle copied to clipboard

Unneeded python backend dependencies

Open johanfforsberg opened this issue 7 months ago • 2 comments

Hi, and thanks for this great project!

I am investigating to move my drawing application from pyimgui, which appears unmaintained and also doesn't really support the imgui docking branch, to imgui bundle. So far it looks great!

Since I will be using Pyglet as backend, I am not going to need glfw, and in principle neither PyOpengl, yet they are "hard" dependencies of the bundle. Uninstalling glfw appears to be fine, but PyOpengl is used by the ProgrammablePipelineRenderer class. However since pyglet has its own opengl bindings pyglet.gl, it should be possible to use that instead.

I have previously ported the pyimgui ProgrammablePipelineRenderer class to pyglet, for the same reason, and probably it would not be too much work to do the same for pyimgui_bundle . I could have a go at it, if it sounds interesting.

However it would be pointless if the glfw and pyopengl dependencies weren't also made optional. Have you considered making the backend dependencies work like in pyimgui where you would install e.g. pyimgui[pyglet] in order to only get the stuff needed for working with pyglet, and so on? Since the code appears to somehow auto-detect the backend from what's installed, I think it would also make it more clear what backend is being used.

To be clear, this is not a blocker for me, I just prefer not to install stuff that I won't use :)

Cheers!

johanfforsberg avatar Jul 23 '25 16:07 johanfforsberg

Hm, I think I got confused, it appears it's not possible to use hello_imgui with the python backends. Things however still work even if I uninstall glfw so I guess it has its own internal version.

Anyway I am fine with using "plain" imgui since that is what my original application is doing, and it still means that there are some unused dependencies installed.

johanfforsberg avatar Jul 24 '25 07:07 johanfforsberg

This should be solved now, see related issue https://github.com/pthom/imgui_bundle/issues/409

pthom avatar Nov 09 '25 18:11 pthom