Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ofxImGui upgrade #110

Open
8 tasks
Daandelange opened this issue Jul 11, 2021 · 8 comments
Open
8 tasks

ofxImGui upgrade #110

Daandelange opened this issue Jul 11, 2021 · 8 comments

Comments

@Daandelange
Copy link
Collaborator

Daandelange commented Jul 11, 2021

Hello everybody,

I've been making some upgrades to ofxImGui lately and would love to get some feedback before merging them into master.

Long story short, this update now directly binds DearImGui to GLFW instead of binding it to openFrameworks.
This means that the addon will no longer work on any non-glfw ofApp; but that's become quite rare since RPIs have moved to Glfw since oF0.11.
On the other side, this "unlocks" a lot of new features which are really awesome and take this addon to a new level.

The ImGui library has grown quick and there's also a huge community with a lot of addons.
Among new features :

  • Viewports : Popping out the GUI seamlessly out of your ofApp window (!)
  • Docking : A customisable GUI layout engine.
  • Controller/Keyboard navigation support, which is awesome in some live situations or on RPIs.
    (The only hitch is that the oF-embedded glfw lib is quite old, providing not-so-nice-yet controller support)
  • New Gui widgets : Columns, Tables, etc.

I've also merged some work from various forks that remained unmerged. (thanks to @d3cod3, @moebiussurfing, @MacFurax, @katotetsuro, and myself )
Most notably :

  • Loading custom fonts. Together with fontawesome this makes the addon even prettier.
  • Support for using ofxImGui from multiple instances. Very useful when multiple ofxAddons need to submit gui elements.
  • Improved ofxImGui::Helpers and oF bindings : Shorter code.
  • New examples and updated examples.

For a more detailed list of changes, please checkout : Daandelange#1
For upgrading previous ofApps using ofxImGui, checkout the changelog for details on a few minor breaking changes.

You can check everything out in the examples. If you've not checked out (ofx)ImGui for a while, I'd recommend giving it a shot again.

The update is not perfect and there could be some bugs appearing. I'll leave this issue open for a while to collect some feedback.
Everything is in the ofxImGui develop branch for now.


We're almost there ! Merging this soon :

Here's a checklist :

  • Clean up the Readme.
    It's waaaay bigger than the master one, it would be nice to reduce it, maybe split it into multiple files.
    Some text might be outdated, I'll ready everything again.
    Update the screenshot.
  • Verify and simplify all examples.
  • Consolidate ofxImGui versions / releases / tags.
  • Create GitHub issue template.
    Lots of issues don't have any details about the ofxImGui version. It could also point to the DebugWindow doctor.

Optional (if somebody wants to):

  • Verify Android support (specially touch events and keyboard events)
  • Verify iOS (specially touch events and keyboard events)
  • Implement Vulkan support ?
  • Gather breaking changes for easier transitioning.
@Daandelange
Copy link
Collaborator Author

Note: oF is getting updated to GLFW 3.3.7, which is gonna improve the GUI & simplify the setup. :)

@Daandelange
Copy link
Collaborator Author

Daandelange commented Jun 18, 2022

I just updated ImGui to 1.87 in develop, and there's some sweet news.
There were lots of changes on the official GLFW backend, notably io.BackendRendererUserData : maybe multi-ofAppWindows (example-multiwindows) will make it ! :D (this remains to be fixed for it and here)

Meanwhile, any feedback is still welcome.

@moebiussurfing
Copy link

cool! demo example compiled fine here using oF patch-release branch under Windows 10 / VS 2022. thanks for the update!

@Daandelange
Copy link
Collaborator Author

Daandelange commented Mar 19, 2023

A new update to this :)
Ping: @jvcleave , @prisonerjohn .

New Native OpenFrameworks Backend

I found a way to propose the legacy (jvcleave) implementation as an alternative. The main difference is that it uses imgui_impl_opengl2+3 instead of a custom renderer backend. This way, half the backend becomes indirectly maintained by ImGui, needing only to keep the platform backend up to date.

  • This brings back support for ofApps running on any platform (Tested: Mac, Windows, Linux, rpi, iOS simulator)

Native ImGui Backend Hacks

  • imgui_impl_opengl2 has been hacked to support GLES1, which OpenFrameworks still supports but not ImGui.
  • imgui_impl_glfw is hacked to support multiple imgui contexts (needed to support multi-window ofApps) (can be disabled).
  • Both hacks have an automatic update script (patch) and are documented for manually applying them.

Debug window

I'm working on a nice little debug window to help transition to the new ofxImGui
image

I hope to merge develop into master soon, what do you think ?
I have also added a note in master about develop. (a002b3a)

@jvcleave
Copy link
Owner

Nice! sounds good to me!

@prisonerjohn
Copy link
Collaborator

prisonerjohn commented Mar 20, 2023 via email

@Daandelange
Copy link
Collaborator Author

Ok, awesome :)
@prisonerjohn I saw your contributions to OF-VK/ofxImGui. Vulkan should not be hard to get running while it won't compile out of the box. What's the current OF-Vulkan state ? It seems to never have been merged into OF; is it still worth looking at of-vk + ofxImGui ?

@jvcleave
Copy link
Owner

jvcleave commented Jul 3, 2023

I don't think OF-VK is being developed any further. I would say remove it (at least for know) if it doesn't cause any issues

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

No branches or pull requests

4 participants