Skip to main content
GameDev.net gamedev.net
🔒 Locked

Are retained OpenGL GUI's useful in my case?

Started by Darkjuplay Dec 1, 2019 at 11:53 AM 2 replies 4.7k views
Original Post
Darkjuplay
Darkjuplay

Thank you for reviewing my question! I am just starting out as a programmer and I want to create a good 3d Engine based on OpenGL for myself to learn all the concepts that are combined in creating an game engine. I stumbled across Dear ImGui which looks pretty good in my point of view. My Question is whether an immediate mode GUI is useful for an game-engine-GUI like the GUI in Unity3d or Godot because an immediate mode GUI gets recreated every frame unlike an retained mode GUI which is pretty power-inefficient. I am very glad and thankful for help!

Promit
Promit

As you've correctly intuited, immediate mode GUIs become problematic as the scale of the interface becomes large and has more state attached to it. Dear ImGui works really well for typical GUIs used in games that are relatively small and simple, and it is easy to implement. If your goal is something on the scale of a real editor like the ones you've mentioned, a conventional retained mode GUI system is the way to go. More of a hassle to work with, but with good reason.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
ocornut
ocornut

(Disclaimer: I am the author of dear imgui)

I feel that Promit's answer is just rehashing a common answer that has been going round and people keep repeating because this is what their instinct tells them, rather than what they experienced directly. There is a bit of truth to it but it's also a very unbalanced and very misleading answer ihmo.

There are many factors at play, but if anything there are more than enough references in the Dear ImGui Galleries to suggest that it is perfectly fine for the use you intend to do with it. In fact Unity3d is built upon their own IMGUI implementation which it multi-pass and tends to be slower than a single-pass UI. Please see if you can find many actual users of Dear ImGui complaining about performances or scalability issues.

The limiting factors are more about to do with the maturity of a specific framework. Dear ImGui is evidently less feature-complete and less mature than established RMGUI frameworks. But the productivity/flexibility boost can also give you wings and make you create things you wouldn't otherwise.

There's not a single answer. Even the IMGUI/RMGUI dichotomy is largely misleading, where are plenty of factors we intuitively associated to one side (because of existing impl) which have nothing to do with the immediate-mode-api-ness. We are just lacking the choices and R&D to push us forward (even Dear ImGui is miles behind what I wish it was, for lack of appropriate dev team)

I would say go for what you are confortable with.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.