Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GUI Toolkit in OpenGL

I'd like to develop an application (in C++) similar to Pure Data, but with a cool GUI and a better documentation... Yes, something like Max/MSP or Reaktor, but free and open!

In order to create an appealing, reactive and portable interface I was thinking of using OpenGL. In my mind there is something like Blender GUI.

Before starting to develop my custom GUI toolkit I googled around in order to understand if there exist something that I could use, and I found:

  • Juce: it seems quite supported, but I didn't understand if you can only embed OpenGL canvas in your interface or it is possible to render all the widgets using OpenGL.
  • nUI: it seems really cool and portable, but... Its forum is a desert, and it's really hard to find a tutorial!
  • ceGUI, FLTK, GLUI: so flat and gray ;-) and any aren't still maintained.

Do you know other toolkit? As you understand I'm looking for a portable library (in C++), fast and supported.

The other possibility is developing from scratch my custom toolkit using SDL or Freeglut, in this case which could be the best solution?

P.S.: Reading other threads about this topic I noticed that many devs suggest using Qt... Could Qt relies on OpenGL for rendering? Or it could only host OpenGL canvas? Anyway do you think is possible (with good performance) creating something like this in Qt:

  • Reaktor GUI example 1
  • Reaktor GUI example 2
  • Blender Compositing example
like image 755
Kill KRT Avatar asked Apr 09 '11 16:04

Kill KRT


People also ask

Can you make GUI with OpenGL?

Yes absolutely. Maybe not practical though. Have a look at github.com/ocornut/imgui you can use opengl to render the GUI.

What is NanoGUI?

NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful C++ lambdas callbacks, a variety of useful widget types and Retina-capable rendering on Apple devices thanks to NanoVG by Mikko Mononen.

What is an OpenGL wrapper?

Oglwrap is a lightweight, cross-platform, object-oriented, header-only C++ wrapper for modern (2.1+) OpenGL, that focuses on preventing most of the trivial OpenGL errors, and giving as much debug information about the other errors, as possible.

What is the Glfw library?

GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events. GLFW is written in C and supports Windows, macOS, X11 and Wayland. GLFW is licensed under the zlib/libpng license.


1 Answers

There isn't really a good openGL toolkit, they tend to get invented for a particular app and then sort of abandoned.

Yes Qt works very well with openGL, there is an openGL QGlWidget with full hardware acceleration (and optional links to openCL). You can have as many QGLwidgets as you like in a Qt app - each with their own openGL commands inside them.

You can also mix Qt and openGL in the same QGlWidget (http://doc.qt.nokia.com/qq/qq26-openglcanvas.html)

Slightly off topic: You can also select Qt to use openGL for all it's rendering - this is still a bit experimental but means that 2d Qt can be much faster on some embedded platforms like phones.
edit: To clarify -the entire app are still normal Qt but drawn with openGL commands 'under the hood'

like image 146
Martin Beckett Avatar answered Oct 14 '22 11:10

Martin Beckett