Slashdot Mirror


OpenGL Widget Set Recommendations?

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

154 comments

  1. WxWindows by Anonymous Coward · · Score: 2, Informative

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

    1. Re:WxWindows by watzinaneihm · · Score: 4, Informative

      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?

      --
      .ACMD setaloiv siht gnidaeR
    2. Re:WxWindows by Unregistered · · Score: 1

      Nice. Does it subscribe to the Apple interface guidelines on it's own or would certain parts need redoing? But for *NIX/Win32 tghis looks interesting. Any thoughts on this vs qt

  2. wxWindows by Hanji · · Score: 2, Informative

    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
  3. Additional requirement - Widgets on textures! by kbonin · · Score: 4, Interesting

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

    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? :) (Wish that code was cleaner...)

    1. Re:Additional requirement - Widgets on textures! by jooon · · Score: 1

      A 3d embeddable Gecko control, anyone? :) (Wish that code was cleaner...)

      You mean like something taken out of a David Cronenberg film?

    2. Re:Additional requirement - Widgets on textures! by Anonymous Coward · · Score: 0

      Do you know http://www.3dwm.org/ ? Perhaps it may be usefull (somehow).

  4. Coin3D offers 3D widgets by Anonymous Coward · · Score: 2, Informative

    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.

  5. Portability by cbv · · Score: 4, Informative

    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.

    1. Re:Portability by Dark+Lord+Seth · · Score: 2
      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].

      Better change the name of whatever you want to code to "GNU/$ORIGINAL_NAME" lest you want to wake up one night with RMS next to you with a hockey mask and GNU/chainsaw.

    2. Re:Portability by Anonymous Coward · · Score: 0

      While I like GNUstep very much, I don't think the author of the article wants to pick up everything that is objC. Sounds like a C++ person.

  6. wxWindows, FLTK by g4dget · · Score: 4, Interesting
    If your needs are modest, you might want to use FLTK. It's simple and you can link with it statically. If you need a full-blown widget set, wxWindows is a good choice. Both of them let you embed OpenGL windows inside the GUI. They are not implemented using OpenGL as the graphics layer, however: they use whatever native GUI there is and embedd OpenGL windows.

    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.

    1. Re:wxWindows, FLTK by John+Miles · · Score: 1

      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.

      Just curious: why do you say that?

      --
      Dahlmann tightly grips the knife, which he may have no idea how to use, and steps out into the plain.
    2. Re:wxWindows, FLTK by ikoleverhate · · Score: 4, Interesting

      Worth pointing out that FLTK not only lets you have OpenGL windows inside it's windows, but that ALL it's widgets' draw functions can contain OpenGL code (whether a specific OpenGL widget or not). This means you can have lit and textured buttons for example, and have the mouse pointer as a light source. ;)

      I'm not sure if any of the others do the same as I have never used them.

    3. Re:wxWindows, FLTK by Anonymous Coward · · Score: 0

      in s0cvIET RUssIas, FLTK wsxWINdows YUO!

    4. Re:wxWindows, FLTK by JFMulder · · Score: 3, Insightful

      I guess it would have to do with the fact that 99% of the time you work in double buffering mode. So a click on a button in the interface will mean you'll have to do an entire redraw of the window, and that is really slow. You have do redrawyour whole desktop, than flip buffers. One cool hack tought would be to always write your UI modifications on the front buffer, but it would be hell to keep track of everything that is under the pop ups. OS widgets are fast : the changes when you interact with a widget are local and don't demand a whole screen redraw, since they work in single buffer environment.

    5. Re:wxWindows, FLTK by g4dget · · Score: 2

      OpenGL has lots of overhead, it's not supported on many devices/screens, it doesn't address many important functions like window management and internationalization, and it doesn't easily give you as much control at the pixel level as 2D graphics APIs designed for user interfaces. Probably as a consequence, I have yet to see an OpenGL-based widget set with the same functionality and quality as wxWindows or even FLTK.

    6. Re:wxWindows, FLTK by BlackHawk-666 · · Score: 1

      Couldn't you just draw the changed part of the window into the second buffer, then flip. If you then update the first buffer (in a background thread maybe) so it mirrors what's on screen you will be ready to flip again. This does mean drawing everything twice, but you are at least only drawing the dirty parts of the screen - and that will save CPU cycles.

      --
      All those moments will be lost in time, like tears in rain.
  7. Re:YOU FAIL IT! by Anonymous Coward · · Score: 0

    1 minute difference between posts, Moderators abuse the -1 Redundant

  8. Wait by Anonymous Coward · · Score: 0

    ...what?

  9. Defanetley SDL by anonymous+coword · · Score: 2, Insightful

    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!

    1. Re:Defanetley SDL by Anonymous Coward · · Score: 0

      worest speeling EVAR!

    2. Re:Defanetley SDL by azcoffeehabit · · Score: 1

      Yeah SDL is one of the best API's around. It has everything you need to make cross platform OpenGL. Input, window management, music, multi-threading, 2D & 3D capabilities.. It has it all :)

      There are some books about SDL, but the really good stuff can be found in the online documentation off of the web site. SDL also has really good community support. I have had nothing but good experiences with SDL and I would recommend it to everyone.

      --
      :)(smile)
    3. Re:Defanetley SDL by Anonymous Coward · · Score: 0

      I object to the claims of SDL being supported "extensiveley" by the community. Nothing has been done with its Documentation Project for at least two years. Other than book$, there's not much else to go on.

    4. Re:Defanetley SDL by Anonymous Coward · · Score: 0

      This is a blatant troll. (And a successful one. The spelling errors must be an intentional hint that the rest of the message will be wrong as well, but it still got modded up)

      Does SDL even have GUI capabilities? None of that "good stuff found off the web site" implies that it does. SDL (the graphics parts anyway) is just a framebuffer abstraction library. That's an important function, but totally different from a GUI Widget provider.

      To an application, SDL appears as a framebuffer device, similar in extend to software like X11, svgalib, Microsoft's GDI and DirectDraw, and Linux's fbdev. However SDL is capable of multiplexing between any of those backends (and more, like the infamous AALib).

      GUI Toolkits are more what the questioner asked about (and cataloged extensively). SDL could serve as a cross-platform backend to several of those toolkits, but if you try to use SDL on its own, you'll wind up writing all kinds of button and menu handling code from scratch. That's not what the questioner wants to expend his efforts on.

    5. Re:Defanetley SDL by Anonymous Coward · · Score: 0

      I was getting tired of definately anyway

    6. Re:Defanetley SDL by Dominic_Mazzoni · · Score: 2

      SDL is great, but it's not a GUI toolkit.

      Use SDL if you want to create a cross-platform game, or movie player. For everything else that has a GUI, use wxWindows or one of the toolkits mentioned above.

  10. Actually by Anonymous Coward · · Score: 2, Insightful

    You ARE reinventing the wheel. But don't let that stop you, you may just come up with a better/cheaper/faster Wheel.

  11. Mozilla XUL by mgarriss · · Score: 1

    Mozilla has a nice GUI building XML language called XUL. It's cross platform has support for skins and themes and such.

    1. Re:Mozilla XUL by Anonymous Coward · · Score: 0

      except that it can't be used within OpenGL unless you something we don't

  12. No Kidding by Anonymous Coward · · Score: 0

    whoever modded that as redundant shouldn't be allowed to moderate...

  13. PUI by Micah · · Score: 2

    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.

    1. Re:PUI by Anonymous Coward · · Score: 0
      Wow! Flightgear really looks slick! Judging from the screenshots at flightgear.org's main page, it should be up to the standards of a 1998 flight simulator in only a few short years!

      Objectively, compared to retail box flight sims, flight gear is very little very late.

      However, compared to other open source projects, it is a testament to hard work, product-focusedness, and the passion and smarts of its creators.

      The previous two sentences converge at the major problem with OSS as it exists today.

    2. Re:PUI by Anonymous Coward · · Score: 0

      I'm a little late here with a response, so probably no one will see this, but let me just toss a few things at you in response to the "approaching 1998" sim standards.

      As far as I know, FlightGear was the first "PC" flight sim to have the entire world scenery available based on digital elevation mesh data, i.e. real terrain for the entire world, and not just funny colored pyramids; lit, shaded, textured, and solid.

      FlightGear was committed to OpenGL before any "PC" flight sim started down the path of hardware 3d acceleration.

      FlightGear has a full working sky with correct stars, planets, sun, and moon positions. The moon even has the proper phase ... all synced with the current clock. Set your virtual position to your real physical position, make sure your computer clock is pretty close to correct, and what you see out your window in terms of daylight, sun, moon, star, and planet position should match exactly what you see on the screen.

      Don't forget FlightGear's incredibly open and flexible architecture. This is something that high end users of commercial "PC" sims would drool over.

      FlightGear has non flat runways ... don't know of a "PC" sim that does that even now.

      FlightGear's runway, approach, and taxiway lighting is all directional, just like real life. And it smoothly transitions from full brightness at the optimal viewing angle to almost disappearing at the least optimal viewing angles. Remember that runway and approach lighting is a lightbulb in a fixture that is aimed in a particular direction. I also don't know of a "PC" sim that does this yet.

      FlightGear's 3d cockpits are fully clickable, fully funcitonal, and not just faked with 2d artwork. You can even zoom in from an external chase view and see the fully working 3d panel from the outside.

      Yes, there are still things that FlightGear lacks and we are working hard to address them, but if you look past the 100x75 resolution screen shots on the front page, you may find some nuggets worth exploring.

      And also, FlightGear is not intended to be a game. This is a realistic flight simulation. If you are used to 1st person shooters with lots of slick visual tricks and lots of explosions and action, you will probably be very bored. Aviation is defined as long periods of boredome intermixed with rare and brief periods of intense terror. :-)

      If you want to practice shooting approaches at your favorite airport, or take a sight seeing flight someplace you've never been before, or fly a plane you'd never get your hands on in real life, or fly in conditions you'd never attempt in real life, and if you want to do this without shoveling even more of your hard earned $$$ in MS's direction; or if you are a geek/do-it-yourselfer who likes to pop open the hood, then start pulling the engine apart; then FlightGear might be just what you are looking for.

      Oh, and just so you don't think this is too far off topic :-) FlightGear does use pui which is part of plib. It is very nice for overlaying a simple GUI on top of a 3d opengl application, but it's not intended as a full blown complex GUI where the GUI is the primary focus of the application. But like anything, it has grown a lot of features over the years, so you can get a lot of mileage out of it and do some fairly complex things with it. We at the FlightGear project have had good luck with it.

  14. SDL is OK by Saiai+Hakutyoutani · · Score: 2, Informative

    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!

    1. Re:SDL is OK by Grahf666 · · Score: 1

      Not positive, but I'm pretty sure Sony's dev kits have OpenGL as the graphics rendering library.

  15. Qt by Sesse · · Score: 3, Informative

    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.)
    1. Re:Qt by Anonymous Coward · · Score: 0

      All of thees posts about wxWindows, QT, XUL, etc. don't understand. The poster wasn't asking about standard UI toolkits, he wants one that will work within OpenGL

    2. Re:Qt by Sesse · · Score: 1

      In that case, several of his own suggestions seem to be wrong in exactly the same aspect. :-)

      /* Steinar */

      --
      (This comment is of course GPLed.)
    3. Re:Qt by Unregistered · · Score: 1

      I have been using qt for my development. Since i don't have a windoze compiler i haven't used it cross platform, but signals/slots are great and designer is a well done tool but not necessary.

    4. Re:Qt by Anonymous Coward · · Score: 0

      I am of course delighted that I can resell your post and charge support for it, or modify it and pass it off as my own providing I GPL the result - you stupid, brainwashed fool.

    5. Re:Qt by Dominic_Mazzoni · · Score: 3, Informative

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

    6. Re:Qt by Sesse · · Score: 2

      Yes, it was before 2.0. (Everything was horribly painful to use, dialogs were a pain to set up, there was no real documentation except "whee, it's great!", etc. In general it didn't like me, and I didn't like it. :-) ) But no, I don't like MFC either ;-) I'll probably give it a new shot sooner or later, though.

      /* Steinar */

      --
      (This comment is of course GPLed.)
    7. Re:Qt by Anonymous Coward · · Score: 0
      Few months ago I wrote a small app, which I did in wxPython. I developed it in linux but it ran fine in windows.

      My impression of the toolkit is that is has many widgets and controls, but the API is a somewhat ugly.

      In that sense, Qt is vastly superior. The problem is the lack of a free windows version, of course.

      Another problem with wxWindows, is that at that time it used gtk-1.x, wich IMO looks not so good. gtk-2.x is very different, tough.

  16. blah by Anonymous Coward · · Score: 0

    Easy..

    Pick one platform and fuck the rest. Windows users does NOT like using other widget sets than the deafult Win32. I would never use your program over a native win32 program if it meant it came bundled with 1MB+ of dll files to provide GUI support. Why? well.. it reminds me of something called VISUAL BASIC!!!

    1. Re:blah by Anonymous Coward · · Score: 0
      Yes, in this day and age, the future of computing is all about keeping file sizes small. With _200 gigabyte_ hard drives costing less than $300 and increasingly ubiquitous fast internet connections, the emphasis needs to be, on, for example, creating tiny ELF binaries.

      What open source does not need, if it wants to beat microsoft, is an environment that allows non-31337 h4X0r programmers to devleop business applications quickly. No, developing such tools is a surefire recipe for mainstream disaster. Let's instead mock the users of such tools until they accept our whining to the extent that { Perl | Python | some other nonsense } actually does the same thing.

  17. GTK? by DavidTurner · · Score: 2, Informative

    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.

    1. Re:GTK? by Anonymous Coward · · Score: 0

      has the advantage of a very strong design

      Huh? You mean that uglier-than-sin, fucked-up shit-for-design, retched, vomitous excuse for a GUI called GTK? You're joking right?

    2. Re:GTK? by Anonymous Coward · · Score: 0

      I think you missed the "cross-platform" part of their requirements. Gtk has never worked right on Windows and it could be a very long time before it does*. Plus it's huge compared to FLTK or something like that.

      * That's not totally true since Gtk sorta works on Windows... just not 100%, I wouldn't risk it.

  18. Cross platform widgets are BAD by JFMulder · · Score: 5, Interesting

    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!
    1. Re:Cross platform widgets are BAD by Hanji · · Score: 4, Informative

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

      --
      A Minesweeper clone that doesn't suck
    2. Re:Cross platform widgets are BAD by SparhawkA · · Score: 2, Informative

      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 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!

    3. Re:Cross platform widgets are BAD by Anonymous Coward · · Score: 0

      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?

      This is mostly misinformed. I don't know about the first one, but the rest are not dependent on widgets. Windows don't get control of their own titlebar, for instance, in X or MS Windows. Moving around windows is also not dependent on widgets - if you move by alt-tab, for instance, whatever manages your windows catches alt-tab before it gets sent to your app.

    4. Re:Cross platform widgets are BAD by Spellbinder · · Score: 0

      because of this there is something called windows manager..
      think about how annoying it would be if you double click on one windows and it maximises then same on the next and it minimizes :p
      he got a point but the wrong examples =((
      in windows there is a lot of standardisation in applications layout
      the save icon always looks same, undo is in the second menu from left and so on =)
      'not power users' dont even know how the function they are looking for is called, they just know where it should be...
      if they have to search anything you annoy 'em and they will stop using your application

      --


      stop supporting microsoft with pirating their software!!!!!
    5. Re:Cross platform widgets are BAD by kaphka · · Score: 1
      Windows don't get control of their own titlebar, for instance, in X or MS Windows. Moving around windows is also not dependent on widgets - if you move by alt-tab, for instance, whatever manages your windows catches alt-tab before it gets sent to your app.
      You're right about alt-tab, but that's an exception. Badly written Windows programs can take control of just about everything else. To break the title bar, all they have to do is create an undecorated window and draw the title themselves.

      JFMulder hit the nail right on the head, though. When developers decide to use their own widgets instead of those provided by the platform (usually so they can offer a choice of l33t "skins",) they're very unlikely to make them complete, especially when it comes to behaviors that are fairly obscure. Sure, it's not fair to expect a programmer to know all the subtleties of every environment in which his program might run -- that's what abstraction is for. Is it really worth it to throw away that advantage, just so your program can have a 3d-accelerated GUI?
      --

      MSK

    6. Re:Cross platform widgets are BAD by ndogg · · Score: 2

      I have to disagree with you there. I've been using wxWindows for a while now. It's the best "CPW" I've used before, commercial or OSS (of which, it is the latter.) It uses native widget sets, not its own like FLTK, nor an emulated one like Qt. The only problem with it right now is that the MacOS and MacOS X ports aren't stable yet.

      --
      // file: mice.h
      #include "frickin_lasers.h"
    7. Re:Cross platform widgets are BAD by Anonymous Coward · · Score: 0

      Sometimes. But if the application is complex, then the time it takes to "learn the widgets" is minimal compared to the time it takes to solve domain-specific tasks.

      In other words, for most useful applications the domain-specific complexity quickly dwarfs any user interface difficulties resulting from using your own widgets. A complex task simply requires a complex UI, and whether buttons have their drop-shadows below and to the left or vice-versa is the least of your problems.

    8. Re:Cross platform widgets are BAD by Shisha · · Score: 1

      I'd agree with you in the case of a simple utility, say a sound recording program.


      However once the application we're talking about is huge and the user is going to use only this program for hours and days, I don't think it's such a big deal. An example might a sound mixing, processing, on-the-fly editing program.


      I use JBuilder quite a lot and I think it's no big deal that it behaves nothing like my KDE desktop. I mean yes CPW that mimic the behaviour of the platfrom are nice, but they just are too much hassle and in the end a decision must be made about what is feasable.


      As for the Adobe example, they are not trying to support UNIX/Linux deskotp. Being consistent and pleasing everyone is almost impossible. What "native" behavior should it emulate? KDE? GNOME? Motif? WindowMaker? Just try running Acrobat Reader on Linux and see how out of place it looks.


      As for standart behaviour for each platform, that can be coded right into the application, e.g. any program can support the basic GNU/Emacs shortcuts (JBuilder does :-) ).

  19. Having just built and deployed a SDL app by codepunk · · Score: 2

    SDL is the way to go, easy easy easy....

    --


    Got Code?
    1. Re:Having just built and deployed a SDL app by Hanji · · Score: 1

      SDL is easy, yes, but for a GUI app it's probably not the best choice. There is ParaGUI, but something that implements controls using the platforms native libs is probably better, and I've had a lot of problems getting ParaGUI working.

      --
      A Minesweeper clone that doesn't suck
  20. Think why Not what. by crovira · · Score: 2

    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.
    1. Re:Think why Not what. by Anonymous Coward · · Score: 0

      And set up your API's on data streams so that you NEVER waste a cycle pumping data one pixel beyond what's visible.

      And thus incur a performance overhead on every single drawing operation as the API keeps track of what's visible or not.

      Your suggestion is valuable in some cases, but its up to the application author's knowledge of how much data will be drawn, and where it comes from. (Better worst-case performance, but slower in average cases)

      In a highly controlled game environment, the level designers can be trusted to create only objects simple enough to display all at once (without any tricky checking- you can move the visibilty checking to design-time)

      But yes, for a generic 3d editor, someone's going to copy his 600 polygon cylinders to start building a forest of tree stumps, and individual refreshes could grind to a halt. (For a first-hand view of this problem in action, try a recent build of Sodipodi. Load a medium sized file, the tiger for instance, and then try to scroll around with the mouse)

  21. Duh!!! by decep · · Score: 2, Funny

    http://www.googl... damn... he's already been there.

  22. FastGraph by andr0meda · · Score: 1

    Slightly offtopic, since it's not about widgets, but I thought I'd mention it anyway:

    There used to be a graphics library called FastGraph by infamous Ted gruber Software, and surprisingly it is still around(It actually predates borlands BGI driver, if people still remember that one). I used it 10 years ago to take my first feeble steps in graphics in c++, and designed my own widgets and basicly invented my own buttons/frames/menus system all by myself, and to this day the framework of that code is still usuable. Anyway, it's not a recommendation or anything, I would never used it at this time.

    --
    With great power comes great electricity bills.
  23. prototyping is important by FranTaylor · · Score: 2, Interesting
    I've written some very nice 3-D apps using OpenInventor and Motif. OpenInventor is excellent for prototyping 3-D apps. I worked on a simulator project where we used OpenInventor, Motif and Scheme. We had Scheme bindings for everything. Since Scheme is interpreted, we could make changes "on-the-fly" without recompiling or even restarting the program.

    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.

    1. Re:prototyping is important by JudgeJackson · · Score: 1

      Lisp is nice in this regard... develop in a real-time interpreted environment and then compile it all to native code when you release it.

  24. Check out ClanLib by drivers · · Score: 2

    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.

  25. OGRE is another option by mcoletti · · Score: 1

    OGRE is an OpenGL (and alternatively DirectX) scenegraph library that's still in development, but may already provide useful functionality. Think of this as a next generation SGI Open Inventor. I've used Open Inventor and have recently switched to OGRE since OI shows it's pre-ISO C++ standard roots. (And pre-Scott Meyers. And pre-Gang of Four Design Patterns.)

    --

    MAC | A polar bear is a cartesian bear after a coordinate transform.

    1. Re:OGRE is another option by Anonymous Coward · · Score: 0

      Gee. Coding by celebrity.

    2. Re:OGRE is another option by mcoletti · · Score: 1
      Effective C++, More Effective C++, and Design Patterns should be mandatory reading for C++ programmers. (The last is just a good general object-oriented design text, so it's obviously not constrained to C++ hackers.) Those books give knowledge critical for C++ proficiency. Yes, that knowledge can be learned from other books, classes, or from being self-taught. However, those books provide standard points of reference that veteran C++ programmers can use to evaluate other C++ programmers and projects. Though ignorance of them doesn't necessarily make for a bad C++ programmer, but instead significantly increases that probability. (Just like observing a programmer using Wordperfect to write code probably means that programmer sucks. And, yes, that's a True Story (tm). He'd write code in Weirdperfect, save it, shell out to DOS, convert the code to ASCII, and then hand-type the 100+ character command line to compile the code. Introducing text editors and make files shouldn't be a road to apotheosis. :P )

      It's not "coding by celebrity," but "coding by generally accepted good programming practices." (And, um, not in the sense of Arthur Anderson's interpretation of "generally accepted good accounting practices".) The names associated with seminal books on these practices are just eponymous -- again, they're just used as references by the experienced.

      --

      MAC | A polar bear is a cartesian bear after a coordinate transform.

  26. SWT by j4im · · Score: 1

    I cast a vote for SWT. That's the toolkit developed by IBM et. al. for the eclipse project. It allows you to write your GUI in Java, with native bindings on a variety of platforms for a conventional look and feel (GTK or Motif on Linux/Unix; Windows and Mac too). I've used it a bit and found it very functional and pleasant to code with. It's also very straightforward to yank the SWT out of the eclipse package, and the whole thing is under an LGPL-like license (CPL), as far as I can tell.

    1. Re:SWT by Anonymous Coward · · Score: 0

      And if you use gcj you can compile down to native code, deploy without a proprietary JVM, and use the wonderful CNI native code interface to C++. Nirvana.

    2. Re:SWT by AG · · Score: 1

      Even easier.... Grab

      ftp://sources.redhat.com/pub/rhug/swt-gcj-green- sn apshot.tar.gz

      and just configure/make to get lib-org-eclipse-swt.so with gcj.

    3. Re:SWT by Randolpho · · Score: 2

      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
  27. Check out how Blender3d does it by quinticent · · Score: 1

    They use an all OpenGL widget set. I was amazed to see that you could scale the widgets like any OpenGL object.

  28. GLUI Rocks! by shidda · · Score: 1
    I have used GLUI for my 3rd year computer science dissertation. I used it for a cross platform GUI interface. I found GLUI to be excellent for my needs. It looks very nice it is very easy to achieve what you need in very short c++ code.

    The fact that GLUI is built on top of glut means that it is as cross platform as glut itself. I have not used any of the other toolkits but I would definitely use this toolkit again.

    If you are intrested in what i used it for I have a short description of my dissertation (with screenshots) at :

    http://www.hamza.legend.org.uk/diss.html

    Hope this helps.

  29. Steer clear of... by Anonymous Coward · · Score: 0

    Anything that closely resembles the ugly abortion-on-a-stick called GTK

  30. Create a native GUI by Anonymous Coward · · Score: 0

    Using traditional menus and methods do not work for this kind of app. Please ignore the /. robots.
    3D animation & modeling applications require more interaction than almost any other type. They have many features that need to be exposed yet organized.
    I recommend creating your own GUI and rendering it in the OpenGL context with the rest of the app. You're already going to use the mouse in an OpenGL context, so you shouldn't have too manny issues using that space.
    You can write code for input, doc handling, and creating the OpenGL context natively...

  31. People won't use your program because its portable by Anonymous Coward · · Score: 0

    Uh, this might seem, at first sight, to be a fairly stupid recommendation, and in fact, it may turn out to be a stupid recommendation at second and third sights as well, but anyway, I suggest that instead of looking for an insanely portable GUI solution, you just drop the cross-platform requirement or at least pare it down to perhaps 2 platforms.

    You'll be working on your app for _years_ and nobody can predict the future. Besides, you want to focus on making your app be the best 3D modeling environment it can be; not the best cross-platform 3D modeling environment.

    When your app becomes good enough, people will want to port it no matter what. At that point, you'll have _specialists_ working on integrating your app with their favorite OS, and all your dull lowest-common-denominator code will be thrown out anyway.

    So pick the toolkit that results in the best 3D modeler for your platform and perhaps one other platform. Then just use common sense: i.e. don't rely on side-effects that only occur in a very particular batch of stepping 3 Pentium II's, but don't abstract your design into oblivion either.

    Anything above and beyond that, at this early stage, is just a flight of fancy.

  32. Since you actually ARE reinventing the wheel... by Qbertino · · Score: 2

    ....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
    1. Re:Since you actually ARE reinventing the wheel... by AlXtreme · · Score: 1

      Yups, i too have looked down the 3d-toolkit lane, saw fresco and guessed i could spend my time on better things. What the poster is aiming at (or what i can comprehend from his words), fresco already has, or nearly is there.
      Blender otoh is a waste of time imo. I hope something useful comes out of the whole open-source thing they hyped the community with, but until they sort out their code and make it usable for other developers i for one am not going to look at it again.

      --
      This sig is intentionally left blank
    2. Re:Since you actually ARE reinventing the wheel... by Anonymous Coward · · Score: 0

      re: Blender

      not only do they need to sort out the code, but they need to fix the damn UI. Just the other day I gave Blender another shot and couldn't even figure out how to import a model (yeah, yeah, file->open, but I couldn't tell if it was failing or what but it wasn't working). Blender takes the cake as the worst interface to any non-mainframe program I have ever used.

  33. GLUI by davechen · · Score: 1
    I've used GLUI for a simple modeling program, and I like it. It's simple and easy to use. It's great for grad student/research applications.

    On the other hand, it's only really made for simple, toy-ish programs. You couldn't really use it for a complicated or professional program interface.

    Also I don't know how much Paul Rademacher (the author) is doing as far as updating/maintaining the code these days. Don't ask him about sliders! (There ain't none)

  34. BGI? nooooooo! by CoolVibe · · Score: 2

    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.

    1. Re:BGI? nooooooo! by Anonymous Coward · · Score: 0

      I also remember the days of BGI. And like you, I was also driven to hand-coding my own UI in assembler. So I guess I have the aweful BGI to thank for my continuing interest in assembler and low-level coding. BGI showed me the evils of the popular philosophy "if it isn't fast enough, throw more hardware at it".

      BTW: When is Borland ever going to release C++ Builder for Linux?

  35. SDL and PyGame by monopole · · Score: 1

    Being the lead programmer on a 3D monitor, I'd say that SDL is the way to go. It not only provdes widgets but also an excellent game controller interface.
    Check out the Python wrapping of SDL PyGame

    1. Re:SDL and PyGame by Anonymous Coward · · Score: 0

      Neither SDL or PyGame actually have built-in user interface libraries. You could look at PyUI which is a user interface library written in python. It was specifically written to draw on hardware accelerated 3D surfaces - primarily for video games.

  36. Check out the VGL by IamTheRealMike · · Score: 2
    We made the VGL as a skinnable OpenGL widget toolkit as part of the Pythian Project, and if you're OK with Delphi it's a fine piece of work (even if I do say so myself :p). Looks good, and very high performance (as it was built for a 3D game). It's been through quite a few generations too.

    Obviously if you're not coding in Delphi/Kylix, then it's not much use.

  37. Re:Open Source? by Anonymous Coward · · Score: 0

    Fucking moderators. I don't see how the parent is off topic.

  38. cross platform apps by Anonymous Coward · · Score: 0

    If you have the time and are really interested in making your programs work well within each platform (this means following the respective human interface guidlines etc.), I'd advise you to split your application backend from the gui, and use each platform's independent widget set. Hence on windows use MFC, linux use gtk or qt and on mac carbon or cocoa. Cross platform apps tend to be the worst apps to use from a usability standpoint, because they are usually designed for one platform (usually windows) and then poorly ported to others. By explicitly designing the gui for each individual platform you will ensure that your app fits in well with each of them, improving general usability for all users on all platforms.

  39. Togl (also check out ayam3d) by BLAG-blast · · Score: 3, Interesting
    Hey,

    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.
  40. GTK+ with gtkglarea by Anonymous Coward · · Score: 1, Informative
    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 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.

  41. I'm confused. by NFW · · Score: 3, Insightful

    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.
    1. Re:I'm confused. by Anonymous Coward · · Score: 0

      Duh, I think it's obvious by the list of toolkits. Why did this get modded up?

      FLTK, FOX, etc. don't have native OpenGL widgets.

      So they are looking for something, OpenGL or not, that has cross platforms widgets. Simple huh?

    2. Re:I'm confused. by c0d3h4x0r · · Score: 0

      It got modded up because it's NOT obvious by the list of toolkits. Not all of us are familiar with all these toolkits. Some of us actually have lives.

      --
      Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
  42. I second that, with caveats by It'sVersusItsGuy · · Score: 2, Insightful

    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.
  43. U the same dude? by ixxologic · · Score: 1

    U the same dude that a while ago asked for input on making a full 3d software suite? If so.. heh when u getting a website up? need somewhere I can go and follow updates.. i/o

  44. Re:People won't use your program because its porta by Shaleh · · Score: 1

    actually, Blender required very little porting effort because its GUI was written in openGL. All they had to do was deal with was reading and writing data basically.

    Of course, you make it work on one platform and then start testing elsewhere. That is simple 1st year CS. But you must design from the begining to be cross platform.

    Personally, I would love to hear his secret, evil scheme is to write a better Blender front end. The renderer is so damn sweet and fast.

  45. Use FLTK by stevarooski · · Score: 2

    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.
  46. java by Anonymous Coward · · Score: 0

    swing

  47. TK/TCL, Visual TCL by phrostie · · Score: 2

    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.

  48. Re:People won't use your program because its porta by Anonymous Coward · · Score: 0


    Of course, you make it work on one platform and then start testing elsewhere.


    But that wasn't his requirement.

    That is simple 1st year CS. But you must design from the begining to be cross platform.

    Yes, well. I suppose that's also 1st year CS. What is your point?

  49. Consider by Anonymous Coward · · Score: 0

    In Soviet Russia, the wheel reinvents you!

  50. QT? by punkball · · Score: 1, Redundant

    I'm not an expert in gui programming, and certainly not an expert in any sort of modeling programming, but I was under the impression QT was cross-platform. Osx should have no problem given its unix roots (I can't confirm though), and windows and the various unix's already support it. Could QT work for this guy? It's certainly a very nice looking widget set too!

  51. PyUI OpenGL User Interface by Anonymous Coward · · Score: 0

    Pyui is a user interface library written entirely in the high-level language python. It is targeted primarily as a user interface for games and has a modular rendering interface that can use multiple backends such as OpenGL, SDL or Direct3D
    From the PyUI homepage. If you are using python or could switch to python, PyUI is light-weight, easy to use and has a surprisingly large amount of functionality.

  52. Use GTK+ 2.x by MrMeanie · · Score: 3, Informative

    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

    1. Re:Use GTK+ 2.x by Anonymous Coward · · Score: 0

      If you want OpenGL support in GTK+ 2, use GtkGLExt (http://gtkglext.sourceforge.net/).

    2. Re:Use GTK+ 2.x by Anonymous Coward · · Score: 0

      GtkGLArea is dead. Use GtkGLExt instead.

  53. Re:Cross platform widgets are BAD(Yeah right!!!) by master_p · · Score: 2, Informative

    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!!!

  54. I use Qt and the QGLWidget by MrDog · · Score: 3, Informative

    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.

  55. Re:memory leaks in WxWindows by VZ · · Score: 1

    [disclaimer: I'm an active member of wx dev team]

    If you think you've found a memory leak in wxWindows, please do let us know about it (comp.soft-sys.wxwindows). Remember that if our users don't report the bugs to us, we have much harder time fixing them.

    Of course, in my experience, memory leaks in wxWindows are more often than not leaks (or bugs) in the user code but if you're sure your code is ok, please try to report the problem. Posting a bug report won't take much longer than posting to Slashdot (although arguably it's not as much fun).

    VZ

  56. Who needs widgets? by Comrade+Pikachu · · Score: 2

    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.

  57. wxWindows by b1ng0 · · Score: 0, Redundant

    Take a look at wxWindows. It should fit your needs well.

  58. QT by Anonymous Coward · · Score: 0

    Qt is the best x-plattform toolkit.

    You should also take a look at KPovmodeler.

  59. Experience with OpenGL widget sets by Animats · · Score: 2
    I've been down this road, with some frustration. The basic idea is sound - OpenGL with any 3D graphics board is fast enough today that you can do your 2D work through the 3D engine.

    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.

  60. Another vote for wxWindows by dcuny · · Score: 1
    You've already read a ton of people telling how nice wxWindows is to use. It's all true.

    I've written a small Basic interpreter that uses the wxWindows (unfortunately, too slow to do any real 3D stuff with) and found that it was dead easy to get OpenGL to work with wxWindows.

    Basically, you just have to declare a wxGLCanvas and you've got a nice canvas for drawing on. It's nicely integrated into the wx scheme of things - it generates and responds to the same events that a normal wxWindow does.

    As people pointed out, you end up with native widgets (use wxSizers to make the layout portable), and wxWindows supports just about every compiler under the sun, which is nice for those of us without infinite budgets.

    Plus, there's an excellent group of people on the mailing lists if you get stuck.

  61. Modularity by Unregistered · · Score: 1

    You may want to look in to first creating a giu-less app and then writing a separate gui for it (like mplayer and mldonkey among others). This may make porting adn keeping with interface guidelines easier, in addition others could write the gui (if you let them) which would make your product more enticing.

  62. FLTK by captaineo · · Score: 2

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

  63. Java AWT or Swing and Java 3D. by Randolpho · · Score: 3, Interesting

    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
  64. No no no no no no no... by Duncan3 · · Score: 1

    I do _lots_ of development for 30+ platforms and the time spent porting the GUI is at most about 1-2% of the development time.

    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.

    "Oh but that's so much work, all my code is platform specific" you say? Well, guess what, someone tought you do code GUIs the wrong way. When someone hits a button you dont put the code in the button call, you call your do_XYZ() function, and you're done.

    In fact, Windows, OSX, and a few of the UNIX toolkits will even generate all the code for you when you're done drag/droping the GUI elements on screen! All you have to do is put in the function calls, and you're done.

    In fact in the time you've spent working up the post for /. and all the googling, you could have done the port to windows and OSX, giving you 99.5%++ of the _desktop_ systems on the planet. And your OpenGL is already portable except for the openWindow(), but that's not hard.

    OpenGL is not for widgets, that's what the windowing system is for.

    --
    - Adam L. Beberg - The Cosm Project - http://www.mithral.com/
    1. Re:No no no no no no no... by GooberToo · · Score: 2

      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.

  65. Don't bother with cross-platform by Anonymous Coward · · Score: 0

    If you try to make a full-featured, cross-platform app, you'll just end up with something slow, bloated and unusable like Mozilla or any attempt to write a GUI program in Java. Stick to one platform, and do it right with native tools.

    Of course, given that its used by 90-some percent of all computer users, by all rights that one platform should be Microsoft Windows. In which case, you should use Windows Forms, C#, and .NET -- absolutely the best GUI environment you can get.

  66. Eiffel For Cross-Platform by the_mystic_on_slack · · Score: 1

    Ok, a plug for the Eiffel programming language. For cross-platform development of a GUI, you cannot really do better. Without a large development team, you will never get your software working on one system and then ported within a reasonable amount of time. Unless, your GUI development is cross-platform from the start. Eiffel is extremely quick and easy to learn (the goal of Bertrand Meyer is for every Eiffel programmer to be an expert Eiffel programmer). EiffelStudio is available for Solaris, Linux, and Windows. Same code compiles on all platforms. As for OpenGL, there of course exists EiffelOpenGL. If you are concerned about whether there is success with this language, Eiffel is used to develop all sorts of large systems, including CAD/CAM programs. Look into it. The widgets are so simple it's hard to not give it serious consideration.

  67. LOL, if only it were so simple by Anonymous Coward · · Score: 0

    Gee, if you really do have that much experience then it must just be developing busisness apps or something equally simple (GUI-wise anyway). Not all GUI's have only plain buttens and can just make a simple function call to do stuff. Some applications are neccesarily deeply integrated with the GUI.

    Take a 3D CAD application that uses a split, movable pane view. That doesn't just nicely port over to other toolkits, in fact some toolkits don't offer any split/movable widget at all. There are other examples like this where functionality of the application is just part of the GUI and there isn't any way around that. 3D modeling, painting, and CAD programs can be especially tough because of this because at times the GUI _is_ the application.

  68. Funny by p3d0 · · Score: 1

    I hereby grant you a +1, Funny virtual mod point.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  69. Portable widgets by jvlb · · Score: 1

    You might wish to check out some of the work at mozdev.org to evaluate Mozilla's potential. Also, the Phoenix project is intriguing for its demonstration of Mozilla customizations.

  70. www.treyharrison.com/salvation by Anonymous Coward · · Score: 0

    You aren't searching for an OpenGL "widget kit", you are searching for Salvation(tm).

  71. Re:Cross platform widgets are BAD(Yeah right!!!) by Anonymous Coward · · Score: 0

    Qt sucks. It is a dumb, bloated bag of politically correct technologies to appease the checklist crowd.

  72. Before reinventing the wheel... by lnxpilot · · Score: 1

    May I humbly suggest you check this app out:

    http://www.equinox3d.com

  73. GNUstep + 3DKit by Anonymous Coward · · Score: 0

    You should take a look on GNUstep + 3DKit ...

    GNUstep (url) is an OpenStep implementation. It aims to be multiplatform (even if for now it's mostly linux/bsd based... under Windows it's alpha state), and as Mac OS X is also an OpenStep implementation, it's really easy to write GNUstep apps and port them to Mac OS X (in fact most time you only have to create a new project in ProjectBuilder, add your files, redo you nib with InterfaceBuilder, and voila, it's done). Take a look at GNUMail for an example of a GNUstep/MacOSX program.

    Big advantage of GNUstep is the OpenStep framework (Foundation and AppKit), which is really powerfull and easy to use, along with RAD GUI builder (Gorm on GNUstep, InterfaceBuilder on Cocoa); You could program in Objective C or Java (But Objective C is nicer imho), or even in ruby/smalltalk .. ;)

    It should be easy to add scripting to your application with StepTalk (url) and AppTalk (url), and 3DKit is a framework for creating 3D Scenes (url) ...

    If you want some tutorials, check this site

  74. FP! by Anonymous Coward · · Score: 0

    BLAH.

  75. mesgui by Anonymous Coward · · Score: 0

    mesgui is a really simple GUI I created. It runs under OpenGL. It compiles under windows and linux, but I haven't tested it in macOS.

    It only has about 10 widget types, so if you want something simple, try this out.

    here's the tar file
    screenshot

  76. Java3D by Astayax · · Score: 1
    Did you look at Java3d? It is the most cross-platform environment you can think of and it works on top of OpenGL, what makes it faster than you can imagine.

    Furthermore, it has the possibility to use loaders, i.e. a kind of import filters. IIRC, blender is supported as a loader.

  77. Re:memory leaks in WxWindows by Dominic_Mazzoni · · Score: 2

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

  78. thanks by Anonymous Coward · · Score: 0

    for that exceptionally well researched article! /christoph

  79. Reconsider OpenGL GUI by Anonymous Coward · · Score: 0

    I would really not pick an OpenGL based GUI if I am supposed to write an application which uses OpenGL to do visualization. It is really comfortable with a OGL GUI when compared to dealing GUI Toolkit-OpenGL issues or in general the multiplatform GUI toolkit issues.

    However the problem starts when you start to care about performance. The OpenGL GUI rendering will corrupt your OpenGL state completely, probably putting it to a state which you won't like. If your application is not aiming high frame rates, it doesn't hurt much, since I believe the overhead or re-applying the state is not huge.

    Ps. It is a shame, posters didn't get the point. It is yet another case which posters praise the GUI toolkit they use. It looks like only a few people have read your nicely collected link list.

    Cheers,

  80. Choosing a toolkit by njdj · · Score: 2

    I recently went through the process of choosing a toolkit. The ones I tried were FLTK, FOX and wxWindows.

    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 ... but I'd prefer a package where I didn't have to lose time on that.

    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.

  81. FLTK by joss · · Score: 2

    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/
  82. they're all junk. do it from scratch or not at all by ixxologic · · Score: 1

    Java3D.. GTK..etc..blablabal.. theyre all JUNK.. 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.. and tho it may be easy to port.. and use.. its SLOW AND CRAPPY 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? C++/C ASM.. something like that.. thats what you need!

  83. Re-inventing the wheel.. by Nutter9182 · · Score: 1

    I know you're not reinventing the Blender wheel, but you are reinventing another one - Open Architect 3D, which will be a professional (it's been in full time, paid development for about a year now) open source 3D modeller. I urge you to have a look into it before you get too far into your project as it's been designed very, very well, and it'd be hard to beat something like this as it already has quite a substantial developer list lined up to support it when it's released. http://www.openarchitect3d.org

    The one issue with it is that for the first release it will not be cross platform (because it was basically a lot quicker for the guy to do it Windows-specific than cross platform), but I'm quite sure that will be fixed soon after its release by someone else. Perhaps it's something you could even do as you have been doing this research into cross-platform GUI's. :)

    -Nutter

    1. Re:Re-inventing the wheel.. by GooberToo · · Score: 2

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

  84. Why reinvent the wheel? by symbolic · · Score: 2


    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.

    1. Re:Why reinvent the wheel? by mvw · · Score: 2
      > 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.

      Comparing Java and Erlang/OTP?

      Both names are used to reference a programming language, a large library and a run-time system that is based on a virtual machine.

      Java is (depending on your view and mode) either a dumbed down version of C++ or a version of C++ adapted for use with a virtual machine.

      Erlang however is not an imperative language (where you state the control flow explictly) but a functional language (where the focus is on function evaluation) and a concurrent one too (which means the language system makes it easy for you to work with parallel processes on different CPU nodes).

      Both systems come with large libraries. However Erlangs focus is rather concurrency and high availibility while client side Java provides much GUI support.

      It is not unusual to do the high level programming in Erlang while interfacing to Java GUI code or to C++ performance intensive stuff.

      Regards,
      Marc

  85. Re:they're all junk. do it from scratch or not at by mvw · · Score: 2
    Java3D.. GTK..etc..blablabal.. theyre all JUNK..

    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

  86. What about Qt? by Anonymous Coward · · Score: 0

    Everything it sounds like you need to do can be done through Qt. It's now available by default on most linux systems, and is highly cross platform (ie. Windows, Mac, Linux, Solaris, ...). It provides everything you need to make all sorts of applications, as well as allowing you to embed GL widgets. It's GPL, and let's you choose whether you want to use native widgets (eg. toolbars, check boxes, etc) or custom widgets through styles.