OpenGL Widget Set Recommendations?
"GLUI provides a flexible windowing system and a rich selection of widgets (buttons, checkboxes, radio button sets, spinners, text boxes, arcballs, dividers, packing panels, packing columns, etc.). GLUI's design is very straightforward, and the docs and examples are extremely well done. GLUI is highly portable, since it depends only on OpenGL and Glut.
GLOW is 'a cross-platform object-oriented framework for building interactive applications using OpenGL or similar APIs such as Mesa.' GLOW is basically an elegant C++ wrapper around Glut, providing push buttons, check boxes, radio buttons, scroll bars, sliders, text fields, menus, etc. This is a really nice description of GLOW, including comparisons to GLUI and MUI.
Speaking of MUI, Steve Baker's advice is basically 'just don't.' Instead, Steve recommends PUI, which he wrote. :) Actually, he speaks very highly of GLUI, and does a nice job of pointing out the subtle differences between GLUI and PUI.
PUI is part of PLIB, a rich and vibrant set of libraries for cross-platform game development. This is a wonderful intro to PUI. Go read it right now. Really. PUI itself does all the sorts of stuff I'm looking for, and perhaps more. It looks to be very stable and mature, too.
LibUFO is a C++ widget set for OpenGL, currently in alpha. Features include pluggable look and feel, theme support, and layout manager support. LibUFO can be used with GLUT, SDL or any native GL context, so it is highly portable, too. Except for the fact that this is only alpha code at this point, it looks quite nice.
FOX is a C++ toolkit for developing cross-platform GUI apps. It seems like a fairly standard C++ framework, with built-in OpenGL widgets, too. By all accounts, FOX is quite mature and stable, with a fairly active developer base. FOX supports many OSes, but not, unfortunately, the Mac. And yes, I could easily hack out Mac support myself, but I don't want to do that-- I want to write my app.
FLTK is another cross-platform C++ GUI toolkit with OpenGL support. The advantage of FLTK over FOX is that FLTK supports MacOS X (not 9.x and earlier-- too bad).
DirectFB is a library built on top of a framebuffer device such as the Linux framebuffer or SDL. There seems to be some 3D support in there via DirectFBGL, though the docs say that there is no hardware acceleration support (i.e. Mesa vs OpenGL). The thing that makes DirectFB particularly attractive is the fact that Gtk/Gdk has been ported to it.
SDL and ParaGUI are also an attractive option. SDL is insanely portable, and ParaGUI is a wonderful GUI/widget toolkit that runs on top of SDL. You really need to see the ParaGUI demos running to appreciate how slick it is. The screenshots are nice and all, but they don't do it justice. As well, ParaGUI is really slick in its support for themes, XML, and Python.
PicoGUI was a recent SlashDotting victim. As mentioned at that time, PicoGUI is actually a sophisticated client-server framework, capable of running in a wide variety of environments, including on top of OpenGL. There is plenty of info at the PicoGUI FAQ, including a few comments that suggest it would be a perfectly reasonable choice for what I'm looking at doing. Given the scope of what PicoGUI is trying to achieve, I'm a little nervous that it might be overkill for what I want to do.
Fresco is another client-server framework which some may have previously known as Berlin. Fresco seems very cool, but again, I suspect it is overkill for what I'm doing.
The GUI Toolkit/Framework Page is also an excellent resource for cross-platform development of all stripes.
And the OpenGL Toolkit FAQ is also an excellent resource with special emphasis on OpenGL."
wxWindows gives you a single, easy-to-use API for writing GUI applications on multiple platforms. Link with the appropriate library for your platform (Windows/Unix/Mac, others coming shortly) and compiler (almost any popular C++ compiler), and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWindows gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much much more.
"Excellent, stable and intuitive API. Very straightforward to learn and easy to port Java, X11 and Win32 code to."
"Thanks heaps for the best piece of software I've ever come across."
"wxWindows 2 has been an absolute dream."
"I've never had an easier porting experience."
"I never thought that cross-platform development could be so easy and simply cool."
"I have used wxWindows in the past very successfully on multiple projects, and think it's the bee's knees. Thanks for everything!"
"wxWindows is jaw dropping amazing. Community support from the mailing list is extraordinary. Are you sure this is free?"
"wxWindows is one of the most magnificent development projects in existence.."
You might want to look into wxWindows It's a cross-platform GUI library that works using platforms' native GUIs, so that your app will take on the look of the platform you build it on. It supports OpenGL nicely, and has what is, in my opinion at least, a beautiful, intuitive OO C++ interface.
A Minesweeper clone that doesn't suck
I'd throw out an additional requirement for an ideal OpenGL GUI library, one that's lead me to start developing my own (It'll be open source when done.)
:) (Wish that code was cleaner...)
It'd be nice if a cross-platform widget/GUI library existed that would allow me to place the GUI's into the environment, by rendering to textures or virtual GUI planes, instead of just as yet another 2d desktop library. Its not TOO much additional work if done from the beginning...
Think of the fun you could have w/ full GUI support in the environment. A 3d embeddable Gecko control, anyone?
Coin3D (http://www.coin3d.org) is a GPL rendition of the Open Inventor toolkit by SGI. This toolkit is a C++ class heirarchy that overlays OpenGL and is really quite nice. It has rendering and scene manipulation tools like material editors. The toolkit has bindings for Trolltechs Qt, and they are working on one for Gtk. I think they have Motif. I'm pretty sure it works on Lintel and MacOS X. I got working on my Mac with Yellow Dog Linux on it.
Good luck.
For your GUI, take a look at GNUstep. It supports Linux, the BSDs, Solaris and Windows and is (pretty much) compatible with Cocoa.
For your 3D graphic stuff, take a look at the GNU 3DKit.
I would recommend against using widget sets with OpenGL as a graphics layer unless you really need it: OpenGL is less than ideal for that purpose.
It is the best XPlatform library out there for stuff like this! It is supported extensiveley by the community, and it is commerically used as well, you would be best off with that, because its a platform that most people have heard of, not to mention better libary compatibliilty!
Nero-burning ROM for Linux!
You ARE reinventing the wheel. But don't let that stop you, you may just come up with a better/cheaper/faster Wheel.
I haven't personally used it, but FlightGear uses PUI. It looks slick, and FG is probably one of the most advanced Open Source projects ever.
For a layer to put between OpenGL and your OS of choice, SDL http://www.libsdl.org/ is more than OK. It even works on PlayStation 2! Don't know if OpenGL will run on a PS2 though =P
SDL doesn't have a GUI actually, but there are several GUIs made FOR SDL by other people.
Good luck!
You definitely forgot Qt. The only downside is that it's commercial on Win32 (unless you're running MSVC6), apart from that it does its job very well, and has a very reasonable OpenGL widget.
As for wxWindows (which others have suggested), I tried it some time ago and I think it truly sucked. Hopefully it has improved since then :-)
/* Steinar */
(This comment is of course GPLed.)
Another big one which you've missed is the GTK. It has a glarea module for OpenGL drawing areas, and has the advantage of a very strong design. On the other hand, since your focus is on building an OpenGL-based system, why bother with the overhead of a widget set at all? Don't reject the idea out of hand. Not having a pre-designed widget set will force you to think carefully about your interface. In my opinion, this is the major shortcoming of most commercial modelling systems - a counter-intuitive UI.
Of course, from a technological angle, cross-platform widgets (we'll call them CPW from now on) are an elegant solution. Design your UI once, and you're done. This seem like A Good Thing.
The problem with CPW is that it gives more time to the user to adapt to your widgets. Of course, one can argue that once you can use the widgets in one environment, you can use them everywhere. That is true. The problem is that not all your users are as good with computers as you are, and it may put an extra strain on the user to learn between the basics of your system and the host OS. How do you drag and drop? How do you move around windows? What happens when you double click on the top? Does it maximise? Does it roll up just to show the title bar?
Take a clue from the major players in the industry. From what I've heard, Adobe updated PhotoShop to give it the Mac OS X look and feel by using it's native widgets. Many companies are now making wrappers around existing library calls, instead of making widgets. That way you have a unified API for all your supported platforms to design your UI on, but also have the advantage of keeping the usual behaviour and look and feel of an application.
Sadly, I don't know of any public library that accomplishes this. But I'm sure that if you looked around enough, you should be able to find a few.
Good luck!
SDL is the way to go, easy easy easy....
Got Code?
Why are people using GUIs?
They basically want to enter textual (single or multi-line text, numbers, dates, currency [specie and quantity]) or spacial (2D or 3D coordinate system point[s]) data
or
to navigate relationships between objects. Think 0|1:0|1|N relationships (select from a list which may be a simple or a compound presentation of text, graphical or mixed views of objects.
Radio Buttons, push butons and other 'screen candy' should be switchable without the developer being involved. This has been available in Smalltalk (Widgets) since '91. Extend don't re-invent.
Let the user theme the presentations. Let the coder concentrate on the objects and the relationships, what's important.
And set up your API's on data streams so that you NEVER waste a cycle pumping data one pixel beyond what's visible. (There is NOTHING as disgusting as waiting on a GUI to fill a window that only shows a few Ks of data with a the complete contents of a multi-megabyte file.)
MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
http://www.googl... damn... he's already been there.
Prototyping tools are different from production tools. It's okay (even preferable) to prototype in one environment, and write the deliverable in another. 3-D design is not cut-and dried, so you will spend a lot of time messing with how things look. This is much easier in an interpreted world than in one that requires compiling and linking of big C++ executables every time you decide that the red cube is a little too big.
It has a section of the API called ClanGUI as well as ClanGL and ClanGUI works with ClanGL. However this project is often buggy and incomplete. Might be worth looking at though if you don't mind submitting bug reports (or patches for that matter!). I use ClanLib and ClanGL in a game I'm working on.
....you might as well use fresco since it's the only kit you mentioned that for once isn't something like ten years behind (and looking like someone shat on the screen) but more like 5 years ahead of time. When you're app is 1.0 stable and beyond both you're app and fresco will be finished and if all turns out well both projects will have something to brag about.
Bottom line: Use fresco or join the Blender project - they've got their own kit fitted extra for the programm and therefore it runs on more or less everything that runs on electricity.
We suffer more in our imagination than in reality. - Seneca
Geez, BGI sucked so much, I wrote my own graphics routines in assembler those days, because BGI *sucked* *so* *fucking* *much*. Yeah I do remember fastgraph though. But my asm routines were faster and did what I wanted then to do. But of course if I would have wanted portability back then I'd definately use it.
Obviously if you're not coding in Delphi/Kylix, then it's not much use.
You might want to take a look at Togl
It's a Tcl/Tk widget, it's pretty friendly and cross platform. There are a couple of 3D modellers using Togl. One of them is called Ayam3d (it's kind of like Maya but not, it's also open source). AC3D is the other modeller I know using Togl, and it's shareware.
M0571y H@rml355.
Do you want a GUI toolkit that will let you put windows and dialog boxes and such inside your GL render context, or... Do you want a GUI toolkit that will draw windows and dialog boxes and such on the destop, and which includes support for windows that host GL render contexts?
Build stuff. Stuff that walks, stuff that rolls, whatever.
I agree wholeheartedly that SDL is an awesome API. I'm using it to develop a cross-platform game with OpenGL as the graphics engine. (SDL is used for the startup, events, and sound). However, SDL doesn't provide any set of widgets by default. You'll have to use someone else's widget set or develop your own, and just because a widget set is SDL doesn't mean it will mesh cleanly with your OpenGL context.
That said, since I developed my own 2D sprite library in C++ on top of OpenGL I'm writing my own set of widgets that will leverage the sprite engine. Basically this comes down to building my own "responder" chain, keeping track of which item has the focus, testing clicks inside my widgets (which are sprites in most cases), etc.
There are obvious advantages to building your own widgets, such as the aforementioned leveraging of your graphics engine to create a distinctive interface. And there are obvious disadvantages, such as the added development time required to put the whole thing together. Either way you will learn a lot about how (not) to implement a GUI.
For most games you can get away with a very minimal GUI, basically testing for clicks inside rectangles, but if you need to do more, such as building a level editor, it's nice to have all the standard items like menus, checkboxes, and file dialogs.
- Tweaking the ears of the grammatically challenged since 2002.
Although I'm not sure if any cross-platform windowing package is going to be robust and stable enough for your needs, were I you I'd take a *serious* look at FLTK and FLUID.
:)
The main reason for this is that it sounds like your project will consist more or less of a UI wrapped around a rendering engine. It is really, really easy to use FLTK to create quick GUIs to work with an existing codebase. As an example, all of the skeleton code we've developed and distributed while teaching graphics courses to undergraduates uses this package; its easy for the students to build on, lots of documentation exists, it has a lot of prebuilt functionality, and its pretty flexible. Since the focus is on *graphics* instead of the *applications*, FLTK fit perfectly for what we needed windowing-wise. And yeah, those who want to work on their projects under linux or OS X can do so without a whole lot of fuss.
Just $.02 from someone who's administered projects that are along the lines of what you're doing (on a much smaller scale). Good luck, looking forward to seeing your work!
- - - - - - - -
Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
most of my favorite 3D applications use TK/TCL.
Ayam3d and AC3D are both fast and light. they run well even on older hardware(i've tested this time and time again.
Also, someone else pointed out Coin3D. i've always hoped that someone would do something with it. it's just too cool.
I have done some OpenGL work with GTK+.
GTK+ does not support OpenGL out of the box, so to speak, but you can get a package called gtkglarea which adds an OpenGL widget.
If you use GTK+ v1.2, then gtkglarea v1.2.x packages are easy to find and come with many distros (e.g. Redhat).
However, I would recommend that you use GTK+ 2.x, since you are coding a new application, and GTK+ 2.x is much improved. There is no *official* version of gtkglarea for GTK+ 2.0 though. HOWEVER, you can get gtkglarea v1.99.0. Look on developer.gnome.org. I think.
Links:
Gnome ftp site
Gnome ftp mirror
GTK+'s main advantages are its maturity, its solid design, and its comprehensive selection of widgets. If your application is going to reach an appreciable size, then you will want a good widget set like GTK+.
As a C++ programmer, I find GTK+'s reliance on vanilla C to be a little irritating, however, you can gtk GTK-- which is a C++ wrapper for it. I prefer to use GTK+ directly though, so I interface my C++ code with GTK+ by using static member functions for callbacks.
Hope that helps
Mr. Meanie
Don't tell me you don't know Qt !!! it's the best, totally cross platform, and definitely preserving the look and feel of the host O/S. And it is not only a GUI toolkit, it has everything:
native look and feel
database support
OpenGL support
XML through SAX and DOM implementations
true componentatization through the signal-and-slot mechanism
theme support
app settings and DLL transparent handling
lots of container templates which are easy to use
full visual environment intergrated nicely with various IDEs
source code 100% compatibility from platform to platform
multithreading and synchronization abstraction using the native O/S
networking abstraction using the native O/S
regular expression handling
HTML support
internationalization support with the easiest handling of UTF-8, ASCII and UNICODE formats
some of the best widget sets with full geometry management
follows C++ logic, unlike other toolkits like MFC or wxWindows
Its only downside is that you have to pay for it, but it is definitely worth it, because it is simply the best toolkit out there!!!
For my scientific visualization project, I use Qt and its QGLWidget for OpenGL vis. It features nice communication to other widgets, easy mouse event interception, and you can share display lists across multiple views. If you intend your app to be free, then they cost you nothing. I have used wxWindows and GTK before, and Qt is vastly superior in my opinion.
Most people using Maya or any 3D modeling application for anything other than dabbling would rather not waste time clicking on buttons. 3D modeling workflow is such that the modeler needs to spend all his time focusing on the model, rather than stopping to hunt-and-peck through menus or to click on some icon that does nothing but waste screen space 99% of the time. Maya uses marking menus to speed up workflow, and all professional 3D apps use keyboard shortcuts for the same reason.
If you really want to be innovative, you will do away with widgets entirely. Oh, wait, it's already been done.
GLOW is a nicely designed widget set, built on top of OpenGL. Written at Caltech. It uses GLUT, which has some problems with multiple windows.
GLUI has some nice widgets, but is badly designed internally - you can't add new widgets without modifying existing code.
GLUT is a big problem. It's widely used, but it's SGI abandonware, with a wierd license that doesn't let you distribute modified versions. So you're stuck with some annoying bugs. To get around this, some people wrote FreeGLUT, put it on SourceForge, and it's in good shape and maintained.
I can give a good recommendation for FLTK. It is a solid, mature toolkit, and yet remains simple to understand and use. FLTK widgets are written in native 2D code (X11/GDI/etc) for speed, but it is very easy to add OpenGL where necessary. FLTK is good for graphics apps because it understands the special needs of programs where a GUI update is not computationally cheap. (unlike other toolkits, it gives you very detailed control over the event loop if you want it...)
Although FLTK's default widget appearance looks dated, it resembles the SGI inteface that people have come to associate with high-end graphics programs. (virtually no high-end graphics software uses the native widgets on any platform, perhaps because native widgets tend not to offer the kinds of things you need - like good color pickers, configurable slider bars, etc)
Just about the only drawback to FLTK is that the API is C++-only, and it's tied strongly into a C++ "one owner" memory management model, which makes it difficult to use from any other language. (however FLTK is simple and well-designed C++, not like the haphazard hodgepodge of classes and poor event systems in many lesser C++ APIs)...
No mentions of this combination yet, so I thought I'd drop one. If you want cross-platform compatibility, Java is the best way to go. Java 3d has a really good OGL set up as a Scene Graph API. Mix in AWT or Swing, and you've essentially got yourself an entire cross-platform system already set up.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
SWT and the Eclipse polatform are very nice. However, he needs to work with 3d as well, and I'm pretty sure there hasn't been a port of OpenGL to SWT, yet, and SWT won't work with Java 3D. :(
His best bet for Java and 3d are to use Java 3d and AWT, not SWT.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
Hi, Vadim.
As an avid wx user (and casual contributor) for three years, let me say that wx is remarkably bug-free for a library that size. I use wx daily, both at work (designing GUIs for scientists at JPL) and on the side (Audacity) and I haven't seen a wx memory leak in a year. Nor have I seen a crash: the worst problems I've seen recently are occasional cosmetic errors that are easy to work around (i.e. a window redraws itself unnecessarily when you modify a certain attribute).
I recently went through the process of choosing a toolkit. The ones I tried were FLTK, FOX and wxWindows.
... but I'd prefer a package where I didn't have to lose time on that.
FLTK had what seemed to be a bug in its scrolling - it could have been my code, of course, but I couldn't track it down. They have a mailing list but don't seem to have a helpful community.
FOX had some major inconsistencies between its documentation and its functionality. Nothing one couldn't figure out
Finally I settled on wxWindows. So far, it works as advertised. The documentation is quite good.
I drew the following lessons from my experience
1 - For a development tool, good documentation is a must. And it has to describe the way the tool is, not the way it was or the way it might be.
2 - A tool with more users tends to be better debugged than a tool with fewer users. This isn't a general rule (if it were, Microsoft products would be terrific) but within the open-source community I've found it a useful guide.
3 - Features, OO-purity, etc are much less important than (1) and (2) if you have a task to accomplish and limited time.
wxWindows is a "fatter" toolkit than I'd consider ideal, but I could get the job done with it. It has an MFC-like "Application Framework" but you don't have to use it if it's not appropriate for you application.
YMMV. I hope my comments help you.
I second the recommendation for FLTK, it's excellent [based upon work done for NEXT]. Very fast, very tight, cross platform, but most of all, easy to understand and modify code. Good OpenGL integration [btw, you might want to think about using OpenInventor instead of OpenGL]. The FLUID GUI builder that comes with it is second to none. It takes a little getting used to, and you need to experiment some to come up with a good way of structuring your application such that you keep the autogenerated code and your application code nicely separated, [email me for more info] but this is not too difficult. I have used VisualC++, Delphi, VisualBasic, JBuilder7, and Qt. All of these builders looked richer and are vastly more complex than FLUID, but FLUID is strangely powerful and more maintainable [GUI builders are usually good for generating something vaguely right quickly but often its easier to restart from scratch than modify earlier projects]. Qt is a close second and has a richer widget set than FLTK, but FLTK beats it in terms of tight code and flexibility [also, FLTK is LGPL so you dont have to buy anything extra to use it on win32].
http://rareformnewmedia.com/
There have been several 3D apps that have come and gone, and right now there are three or so real solid apps that can probably use some help to continue their development:
Blender is a mature, relatively stable app, albeit with a rather funky inplementation of its UI. Implementation notwithstanding, the UI is based entirely on OpenGL. Blender not only supports the modeling, but has a game creation and runtime facilities built right in.
K3D is a very innovative modeling app that has just experienced a resurgence of interest on the part of its original developer, and others. I can't remember if the engine and UI have already been separated to a degree that will allow you to develop your own UI with a K3D engine, but you might want to check that out.
Wingz3d, a modeling app based on Nendo, is very capable, and its current UI is very clean. It's based on erlang, a runtime environment (like java), that seems well-suited to handle a 3D app.
It would be more appropriate to say each of them has their advantages and disadvantages.
if u wanna do it at all then do it properly.. and not be stuck in the sort of jam that wings3d for xample is right now.. www wings.com it's used some really totally garbage ericssons ERLANG language..
Erlang is quite cool. However it is a high level language, and thus the programmer has to grasp some advanced concepts before he can reap the benefits.
and tho it may be easy to port.. and use.. its SLOW AND CRAPPY
Then improve it. I remember this being the work a few individuals only.
and WHO in their right minds thinks its OK to having to install 50mb (4000+ files) of Erlang Runtime libraries to use a 800kb application?
It is possible to create compact stand alone binaries form Erlang code. Besides the virtual machine, there is a native compiler (HIPE) which might improve speed.
C++/C ASM.. something like that.. thats what you need!
Each tool has its uses. Manual ASM coding should only be done for a few hot spots which can't be done in C or C++. From Erlangs's perspective, C and C++ are low level languages. :) So one should do the complex stuff as much as possible in Erlang.
Regards,
Marc
DO NOT use a cross platform GUI toolkit, they all end up looking like crap, and pissing users of all the platforms off because the look and feel is all wrong.
LOL.
You've obviously never used wxWindows. It has the native look and feel of each platform. Period. wxWindows rocks. I highly recommend you go check it out before you comment further on GUI toolkits.
What platforms does it run on and what widget set was used to develop it? The homepage really doesn't show anything...other than a couple of screenshots.
From the plug in section, it seems to imply that it uses MFC. The Win platform needs another modeler like Gates needs another hole in his head. Hopefully, if it's worth a darn, it will be available of Linux and other Unix PDQ. I'm not holding my breath as it never seems to happen. Go figure....