Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

OpenGL Widget Set Recommendations? 154

rrwood asks: "I'm starting work on what is more or less an open-source 3D modeling application, and I'd like to make it as cross-platform as possible (Linux, FreeBSD, Windows, MacOS, etc.). OpenGL takes care of the 3D rendering I'm going to need, but I also need some sort of widget set, and I'm looking for advice as to what to use in that regard. I've done my Google homework and have come up with the following, but would like feedback from anyone who has already used any of these, or has recommendations about anything I may have missed. Yes, I know about Blender, and be reassured I am not planning on reinventing that wheel, okay? :-) So, here's what I've found so far. As I said, if anyone can add to this list or share his/her experiences actually working with any of these, that would be greatly appreciated."

"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."

This discussion has been archived. No new comments can be posted.

OpenGL Widget Set Recommendations?

Comments Filter:
  • WxWindows (Score:2, Informative)

    by Anonymous Coward on Tuesday December 24, 2002 @05:13PM (#4954274)
    wxWindows [wxwindows.org] 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.."

  • wxWindows (Score:2, Informative)

    by Hanji ( 626246 ) on Tuesday December 24, 2002 @05:14PM (#4954277)
    You might want to look into wxWindows [wxwindows.org] 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.
  • by Anonymous Coward on Tuesday December 24, 2002 @05:19PM (#4954313)
    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.
  • Portability (Score:4, Informative)

    by cbv ( 221379 ) on Tuesday December 24, 2002 @05:22PM (#4954323) Homepage

    For your GUI, take a look at GNUstep [gnustep.org]. 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 [gnu.org].

  • Re:WxWindows (Score:4, Informative)

    by watzinaneihm ( 627119 ) on Tuesday December 24, 2002 @05:28PM (#4954351) Journal
    Be careful about threading in wxWindows. About 6 months back I had to write a program using wxWindows and the threading gave me some problems.Most of those libraries are being improved AFAIK
    Also worry about memory leaks. I am not sure If the code I wrote was leaking it or whether it was wxWindows, but hte programs did leak gallons of memory.
    Not that I am an authority on wxWindows, or that it is a bad library, just a warning. Maybe some other readers have had experiences?
  • SDL is OK (Score:2, Informative)

    by Saiai Hakutyoutani ( 599875 ) on Tuesday December 24, 2002 @05:31PM (#4954371)
    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!
  • Qt (Score:3, Informative)

    by Sesse ( 5616 ) <sgunderson@big[ ]t.com ['foo' in gap]> on Tuesday December 24, 2002 @05:31PM (#4954373) Homepage

    You definitely forgot Qt [troll.no]. 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 */

  • GTK? (Score:2, Informative)

    by DavidTurner ( 614097 ) on Tuesday December 24, 2002 @05:46PM (#4954439)
    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.
  • by Hanji ( 626246 ) on Tuesday December 24, 2002 @06:24PM (#4954606)
    wxWindows [wxwindows.org]
    It does exactly what you describe. It provides a single API, that, when linked with the appropriate platform's libs, creates the GUI using that platforms GUI.
  • GTK+ with gtkglarea (Score:1, Informative)

    by Anonymous Coward on Tuesday December 24, 2002 @06:26PM (#4954612)
    I've been doing exactly this and I've been happy using GTK+ and gtkglarea widgtets to create OpenGL Drawing areas.

    It works perfectly OK on any Unix System and also in Win32.

    I wrote several CAD/CAM applications for Linux [inocam.com] using this combination and the port to Windows took only two afternoons.

    It was just a question of downloading all the stuff for win32 and I only had to correct some syntax problemas and change some header files in VC++ (some IFDEFs).

    I also had one more problem with transient windows, because sometimes the dialog windows would move to the back of the main window and get invisible, but I solved that with a IFDEF _WIN32 and a call to a native WIN32 API function

    Even the internationalization stuff works in WIN32.

    In this process I always try to use only GTK+ widgets and avoid using Gnome stuff.

    On the other hand, the user interface builder glade generates perfectly portable code.

  • by SparhawkA ( 608965 ) on Tuesday December 24, 2002 @06:28PM (#4954619)
    While this is true for cross-platform applications which operate identically in each environment, those that assume the look and feel of the target system can greatly reduce the problem. I highly recommend wxWindows [wxwindows.org] as a candidate API for your project as it automatically will make adjustments for you. The documentation is also quite good and there is a solid community of developers from which to learn. (I used it this last semester on an assignment - it's awesome.)

    If you absolutely need your widgets to be a part of the 3D environment... you're going to have to keep looking.

    Good luck!
  • Use GTK+ 2.x (Score:3, Informative)

    by MrMeanie ( 145643 ) on Tuesday December 24, 2002 @07:22PM (#4954878)
    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.org]
    Gnome ftp mirror [linux.org.uk]

    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
  • by master_p ( 608214 ) on Tuesday December 24, 2002 @07:22PM (#4954879)

    Don't tell me you don't know Qt [trolltech.com] !!! 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!!!

  • by MrDog ( 307202 ) <.thurston. .at. .spock.wdtinc.com.> on Tuesday December 24, 2002 @07:51PM (#4954991)
    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.
  • Re:Qt (Score:3, Informative)

    by Dominic_Mazzoni ( 125164 ) on Wednesday December 25, 2002 @07:35AM (#4956510) Homepage
    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 :-)

    How long ago did you try wxWindows? If it was before 2.0, I can forgive you, but especially since version 2.2, wxWindows completely rocks.

    wxWindows provides native widgets on more platforms than any other toolkit (Windows, Mac OS 9, Mac OS X, Unix/GTK, plus wxUniversal which gives you themable widgets based on extremely low-level interfaces such as pure X11 or a PDA's framebuffer).

    It's closely modeled after the most widely-used GUI toolkit in existence (MFC) yet it deviates from the MFC model when necessary to make it more consistent, more flexible, or easier to use. What this means is that it's reasonably easy for anyone to pick up, but doubly easy for anyone who's used another modern C++ GUI toolkit like MFC, PowerPlant, or Qt.

    wxWindows has more utility classes than just about any other toolkit I've seen, too: check out their list of classes [york.ac.uk]. One thing I love about wxWindows is that it goes beyond the least common denominator, and in fact makes it easy to take advantage of platform-specific features when you want to: for example setting the X Display of a window you pop up in X11, changing the Taskbar icon of a window in Windows, or setting the type/creator of a file on the Mac. Oh yes, and it has a perfectly decent OpenGL widget, too.

    wxWindows is also not limited to C++ - it works well from Python, too...

    Finally, the wxWindows developer and user communities are very helpful.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...