pthom / imgui_bundle

Dear ImGui Bundle: an extensive set of Ready-to-use widgets and libraries, based on ImGui. Start your first app in 5 lines of code, or less. Whether you prefer Python or C++, this pack has your back!
https://pthom.github.io/imgui_bundle/
MIT License
592 stars 63 forks source link

Initialize ImmVison from python #134

Closed davidot closed 9 months ago

davidot commented 9 months ago

Really enjoying this nicely bundled version of Imgui accessible via python. However I ran into some issues when extending the code at bindings/imgui_bundle/demos_python/demos_immapp/imgui_example_glfw_opengl3.py

I was trying to display some graphs made with matplotlib using immvision.image_display which works fine with an app setup with immapp.run(...). However in the demo code where you setup gl yourself there does not seem to be any way to access initializing immvision. Am I missing something or is this just not possible? I could try adding some bindings to immvision but I'm not sure that is the correct solution here.

Also if there is some other/better way to display dynamic buffers, would love to know.

pthom commented 9 months ago

Hi, thanks for the nice feedback!

I fixed the issue inside ImmVision here: https://github.com/pthom/immvision/commit/d49fcc8b70c9dbdb76fcaa8b65cf70821ee009d8

You will need to build the bundle by yourself (pip install -v -e .) since I did not push a release as of now.

Please tell me if it works on your side!

davidot commented 9 months ago

Wow very fast, thanks! Yeah it works now