Question

I'm going to start working on a new project. It's a 3D game using OpenGL for Windows, Linux and Mac OS X. and I'm going to need a library for GUI, windowing and handling input. I ended up with 3 choices Qt, WxWidgets and GTK+. All of them are under LGPL license.

1- Does LGPL allow to use these libraries to make proprietary applications?

2- Which one of these 3 applications is best for me?

Was it helpful?

Solution

  1. Yes, so long as you don't statically link to them (ie: use them as DLLs). Though wxWidgets allows you to statically link without becoming GPL'd.

  2. None of the above. If you are making a 3D game, then none of these is good for your needs. The needs of a GUI for a game are very different from the needs of a GUI for a typical desktop application. In a game, you want you particular GUI elements to be consistent with a particular artistic direction, not be consistent with the desktop environment. Plus, you may want your GUI elements to be more expressive than what these toolkits would normally allow.

    It is for reasons like this that CEGUI exists. That is a GUI system designed for the needs of a game.

    Also, none of these provide input the way a game generally wants to process it. You typically want something lower level for a game than what these toolkits provide. That's why projects like SDL and SFML exist.

OTHER TIPS

1 - Yes, provided that your project doesn't require alteration of the library itself

2 - I strongly reccommend Qt for new windowed apps, if for no other reason than it has excellent documentation (although there are many other winning points, but it gets subjective quite quickly). GTK and WxWidgets will both make you waste mental energy thinking about things you really shouldn't have to think about. Qt is easier to a) customise, and b) ignore when you don't care about customisation.

Although for 3D stuff you might want to look into full-blown engines like, ooh, Irrlicht or Ogre3D or any of a number of others

WxWidgets uses LGPL which means you can dynamically link to it in your project, without it forcing your project to be GPL or LGPL.

However, I suggest using CEGUI instead of the libraries you suggested, for any game or rendering application

CEGUI uses the MIT license which is less strict than LGPL and also allows you to link to the library dynamically (preferred) or statically, both without forcing you to have a specific license for your own project.

  • Supports OpenGL 3.2+ Core Profile (OpenGL3 Renderer)
  • Supports very old OpenGL versions (OpenGL Renderer)
  • If you want to use Ogre or Irrlicht engine, which can also rely on OpenGL, CEGUI also supports these two renderers via the CEGUIOgreRenderer and CEGUIIrrlichtRenderer
  • Ssupports Windows, Linux and Mac OS X, just as you want
  • Because someone asked in the comments: Unicode characters are fully supported so that
    you can use Hebrew, Arabic, all sort of Asian alphabets, etc, as shown in the current Font Demo - of course you need to install either one of the CEGUI fonts or use another Open Source Font
  • Was specifically designed for games, simulation and rendering applications
  • You can skin all elements in the UI (currently only via XML, soon also using an editor)
  • Provides a powerful editor (CEED) for layout editing with WYSIWYG (!) for free!
  • Is fully extendable and adaptive via changes in C++ code and/or XML
  • Powerful Event System

It might take a bit to set CEGUI and its dependencies up and get it to run with your project but it will still pay off on the long run because it has a lot more features than most free solutions for UI. Imagine how annoying it would be if you used an UI library and then found out it does not provide a specific feature you need and that it would be almost impossible to add this - because CEGUI is based on C++ and XML and because of its design, you can always add specific adjustments to CEGUI. So you will most likely not run into limitations even on the long run. Also it already has a lot of features out of the box - more than comparable libraries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top