GUI wars, using gui libraries with oF

So there are plenty of GUI addons available, but there does not seem to be a generic OS style GUI that everyone uses. I guess it’s because oF is more about creative coding and less for building programs with menus and such.

I’ve seen some Qt posts and also wxWidgets, however it’s not something too popular and they’re either platform specific or outdated. What are the big caveats when trying to integrate a full native UI? Library version clashes?

Are there any plans on integrating a native UI system on oF in the mid-far term?

Licensing is another problem.
Qt is dual-licensed, commercial and LGPL.
I dont know about wxWidgets, I guess it should be compatible with oF.
JUCE is also dual-licensed.

1 Like

@chuckleplant ofx includes ofxGui. Its built on top of the ofParameter, and is very good for fast prototyping, that covers a wide range of use cases.

I used a lot ofxUI in the past, but is now deprecated by the author, and it has a lot of small bugs and nuisances that will not be corrected. Lately I have been playing with ofxDatGui, which seems promising for my style of projects, but has, as most UI’s, a very specific approach that limits the expansion and variety of use cases.

In my experience, flexible and customisable UI’s are very hard to develop and maintain, just take a look on how many different approaches are available in the HTML world. In my opinion, if you work a GUI intense project, may make sense to develop your custom UI that fits your needs, instead to force another developer approach to fit your requirements and ideas.

Is this really it? Is it at least possible to overload… I think is the term the drawing function of some of the elements so i can make a button look like… oh I don’t know A BUTTON, instead of some glorified checkbox?

1 Like


I also used ofxUI but it is now deprecated.
I tried ofxDatGui, but i didn’t find it really convenient.

ofxGui is really interesting but really limited in widget types. I mean no real button, no input box…
I know ofxGui is being enhanced with some new features and widgets thanks to the work of a community member, but i don’t know when it will merge into oF.

I recently found a new oF wrapper for ImGui, a “Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies” according to its author. This is really a complete set of widgets for a large use cases :


You’d have to understand that OF is OpenGL. So if you want a UI you’ll need one that is drawn in OpenGL.

Native UIs are not opengl. So getting a native UI in OF is really difficult. (Mostly not possible). What can be done is integrating OF into a native widget. This means integrating OF into QT for example and is not too difficult. You’d have to write custom app loop or perhaps some opengl context sharing magic.




I haven’t looked at this code in a long time, but here’s an addon that creates a native gui for use with OF:

it’s based on code from IVT toolkit.

I’ve also had luck using html front ends, either through webkit or CEF, to interact with C++…

A great addon, indeed!

I’ve upgraded it today for latest imgui version, added theme from Cinder-ImGui project and fixed keys, get it from here:

1 Like

Hi procedural,
I was testing the ofxImGui for a couple of days. But I am confused about the ImGui::ImageButton which just loads a textureId from the fonts file. When i want to change an image which is loaded by myself, there is nothing changed about the imagebutton. So do you know how to create an ImGui::ImageButton by the my image?

@procedural are you experiencing the same issue as the one filed ?

Yeah, I get this too for Image() and ImageButton(). Currently trying to solve it…

I’m on Linux Mint 17.3, CPU usage is constant and low, so it must be OS X / MacBook specific problem (I saw issues like that on github for OS X version of openFrameworks, btw)

Ok, I fixed image loading and scissor window clipping! See this example on loading images:

@jvcleave allowed me to merge my fork to his repo, so check his repo now! :smile:

Currently I’m trying to simplify theming, it works by setting just 5 variables:

For default theme:

m_ui.col_main_text = ofColor::fromHex(0xdbede2);
m_ui.col_main_head = ofColor::fromHex(0x044C29);
m_ui.col_main_area = ofColor::fromHex(0x167F39);
m_ui.col_win_popup = ofColor::fromHex(0x45BF55);
m_ui.col_win_backg = ofColor::fromHex(0x00261C);

For a modified one:

m_ui.col_main_text = ofColor::fromHex(0xdbede2);
m_ui.col_main_head = ofColor::fromHex(0x644D52);
m_ui.col_main_area = ofColor::fromHex(0x4C374C);
m_ui.col_win_popup = ofColor::fromHex(0xF77A52);
m_ui.col_win_backg = ofColor::fromHex(0x332532);

And so forth :blush: Tomorrow I’ll make it so tweaking of these variables will be possible inside of imgui, when application is running, in real time…