If possible, I think it is possible to transfer part of the discussion about DirectGUI to a new topic. Some forums have this feature.
While it is all the things you said, it doesn’t have markdown support which most modern gui systems use.
I made an initial effort to embed Panda3D in PySide2/Qt5 here:
If anyone has any feedback that would be appreciated.
Hm. Nothing is perfect, but I think that markdown is not that hard to implement.
@rdb @CFSworks @Moguri
This thread has lost a bit of traction, maybe it’s time for a vote, what Panda should support as main GUI framework ootb and then write up a doc on dropbox paper on how to proceed?
Perhaps we could use this library to add markdown capabilities to LUI:
This library has no dependencies, and is written in pure C, so it should be easily wrapped to C++.
The license is 3-clause BSD.
I think the biggest potential downside of LUI would be the risk of it not being maintained properly to keep up with Panda3D and I don’t think our core contributors should have to maintain an entire GUI framework (however lightweight it may be), since their time could easily be spent on more important features/fixes in Panda3D.
IMO an API extension that allows for easy/easier binding of an external GUI framework of choice and some “easy to integrate” basic GUI that is being actively developed by a third party would be a good compromise. After some more window shopping, my current favorite is Dear ImGui, although I’m not entirely sure I understood @CFSworks second Con entirely:
Would that also be true if implemented in C++ and bindings exposed to Python through interrogate?
I think immediate-mode in this case means the API is immediate-mode, not that it uses immediate-mode OpenGL draw calls, so it wouldn’t need to be run in the draw thread. However, it probably would still need to be run every frame. This might be an issue for very complex UI systems.
The opposite of an immediate-mode API would be a retained-mode API like LUI, where you place elements in a DOM/tree. LUI is very efficient (the entire GUI is rendered in one draw call), but there is the downside of maintenance, so I would only choose it if we don’t find a superior solution (it’s still better than building a new one from scratch, of course).
The primary advantage of an immediate-mode GUI like IMGui is how very easy it is to put something together, which makes it a great choice for building tools.
What also comes to mind is, which of the mentioned frameworks also are portable enough for use on android and possibly on ios in future releases of Panda3D?
Dear ImGUI isn’t designed for Android/ios from what I gather from their github site/issues.
IMGui would probably not be the greatest because it is intended for tools, not game guis, as stated in its readme
However, as Dear ImGui is designed and optimized to create debug tools, the amount of skinning you can apply is limited.
Alternatively, ultralight just released its first stable release.
Ultralight is not FOSS, and only supports three platforms, so it’s not really interesting as a preferred choice of UI framework.
It’s been a long time since I used it, and I thus don’t know how it has developed, but I recall that I used to use a GUI toolkit called “FOX toolkit”. A quick look at the Wikipedia page for it indicates that it has bindings for Python.
While it’s been long enough that I don’t feel in a position to a recommendation either for or against it, perhaps it would be worth looking into?
Wikipedia page: https://en.wikipedia.org/wiki/Fox_toolkit
I have done a lot of work with PySide/PyQt. While I love it, I do think it would be sadistic to expect people to use it as the GUI framework for people learning panda3d. One of the great things about panda3d is that it is relatively easy to learn how to do basic things. One of the bad things about PyQt is there is a really steep learning curve, it is a sprawling ecosystem in its own right, and there are currently no really excellent resources out there (for instance Summerfield’s book is woefully outdated and still uses old style notation for signals and slots). So while I love PyQt, and my first reaction was to suggest that, I don’t think I can suggest it in good conscience. I don’t know what I do recommend, only that it be something that doesn’t itself require two years to learn well, but that it be intuitive and easy to pick up by people who already know Python or html.
Looking again at the documentation for FOX toolkit (mentioned above), I’m not sure that it has the Mac support that Panda might like–but I’m not sufficiently familiar with Mac-related matters to be confident in that. In particular, see the FAQ page, and specifically “Has FOX been ported to the Apple Macintosh?” and “Which Systems are supported by FOX?” (just below the previous).
If it is still of interest, here is the toolkit’s documentation page: http://fox-toolkit.org/doc.html