Using dear imgui along side another GUI framework

I am exploring using dear imgui along side nuklear in an app.

I would like to do this because dear imgui doesn’t have a skinning ability, but nuklear does. This is NOT a game being developed. The app simply has style requirements that dear imgui cannot meet.

For the end user, I want to use nuklear to display the windows using their requested style. But for my purposes, I greatly prefer dear imgui.

The problem I’m having is this: when using both frameworks at the same time, the cursor is not drawn when moving over the nuklear windows. dear imgui seems to be retaining control of rendering the cursor, and since the nuklear window is drawn after the dear imgui windows. If I change the order of drawing, everything is handled properly. So, what about dear imgui is causing it to retain control of the cursor and not allow nuklear to handle the mouse normally?

Also, if I move a nuklear window over a dear imgui window, or vice versa, and then click-n-drag, both windows are moved. I’m pretty sure dear imgui would be able to properly handle not passing on inputs so that only it’s window is manipulated, but is this something that can really be resolved?

Ultimately, what I would like to do is this: setup and render dear imgui first, then allow another GUI framework to be setup and rendered second, without having dear imgui try to retain control of everything going on. Can this be done? Or am I chasing a fools errand?

Just explore what the code in the imgui_impl_xxx platform back-end you are using is doing, there’s very little code in there.

I’m not sure I understand your mouse cursor question but you’ll find the answer in there.

As for input, you probably want to hide mouse inputs from dear imgui if nuklear is in front and wants inputs.

So what I read is: I will have to do more work of “abstracting” out the OpenGL3 and GLFW implementations to get both frameworks to play nicely.

Basically, if I want them to play nice together, I need to do more to have them working within the same context, rather than letting them do everything independently.



I don’t understand your two paragraphs or they are too ambiguous.

There’s probably nothing to do with OpenGL, but inputs/platform wise the top-most UI probably needs to be able to inhibit the inputs to the lower-most UI…

For dear imgui if you set the ImGuiConfigFlags_NoMouse and ImGuiConfigFlags_NoMouseCursorChange config flag the core library will ignore mouse inputs and the back-end won’t attempt to alter the cursor. I don’t know how Nuklear works nor what it provide.

(If dear imgui had skinning, this wouldn’t be an issue. Not a criticism, just a request.)

In closing, I just need to spend more time with everything and figure out what I’m doing “wrong”…if anything. Thanks for your time.