What C++ GUI library can you suggest?

MrValdez
  • What C++ GUI library can you suggest? MrValdez

    I'm building my own game engine in C++ and I'm currently deciding on what user interface I should use.

    Should I use a library? Should I make my own?

  • The problem with most GUI libraries (Qt is probably the most popular C++ one that isn't Windows-only) is that most won't integrate well into an engine. Traditionally in a GUI app, the GUI library controls the main loop and you just hook up callbacks to events. In a game engine you generally want to control the loop, so it can be tricky at best. Maybe you are looking for something that will just handle drawing controls and dialogs and such into an 3D context you pass it? Those can be a lot harder to find :-/

  • One option that might be worth investigating is using WebKit to render your user interfaces and doing all your UI with CSS/HTML/Javascript.

    Here's an open source implementation (Berkelium), and here's a closed source, commercial implemtation (Awesomium)

  • In fact, Qt widgets can be integrated with OpenGL and OpenGL can be easily integrated with Qt (QGLWidget). Of course, the platform native looking widgets might not be exactly what you are looking for, but do not worry, there are ways to customize them, create your own or use something else which would better suit your needs, such as Qt Quick (which you should be able to integrate as well).

    If you are interested, do not miss these links: Widgets enter the third dimension: WolfenQt and Accelerate your widgets with OpenGL

  • I don't think you should write your own, the task of creating a game engine is so huge by itself, if you around there are many many libraries with good licenses that you could use, and modify to your liking.

    For a game engine I would go for an Immediate mode GUI. More informations here: http://www.mollyrocket.com/forums/viewtopic.php?t=134

    The key idea is to draw the component and control the interaction at the same time:

    if (button(id, position, size)) 
    {
        button_was_pressed();
    }
    

    For one, Unity uses a similar concept.

    You can find an implementation by NVIDIA, used in their demos: http://code.google.com/p/nvidia-widgets/

  • I would suggest IUP - Portable User Interface: http://www.tecgraf.puc-rio.br/iup/

    I've only used it with the Lua programming language but it was very easy to use. It only comes in C, LED and Lua flavors but you can easily make a wrapper for it.

  • Personally, I would recommend CEGUI. It's open source and pretty good. However, what you have to keep in mind is that it can be very, very verbose if you write out everything by hand.

    But, on the plus side, it has renderers for both OpenGL and DirectX. I managed to put it on top of the template I normally use, which writes to a texture directly using a VBO (it's kind of hacky).

    The game in question was for a networking assignment. The assignment was to have a networked game, with a lobby. I knew the lobby was going to be a pain in the neck to make, so I picked a library that did most of it for me.

  • I strongly believe in write your own but then again I'm very oldskool. Fighting with yet another GUI lib to do just that one thing that you want tends to drive me nuts, added to the fact that most game GUIs are quite trivial so you don't have to go all-out on MDI and super OO design where buttons can have scrollviews that highlight when you happen to hover over a taskbar on the side of a checkbox with draggable thumbs - or something like that. Different strokes for different folks I guess.

  • Just raising an interesting suggestion, if developing the game for Windows, use the Win32 API. Just use the normal windows controls (I would recommend using the ATL/WTL libraries) but make them owner drawn.

    I saw this technique being used in the first Unreal Tournament game, while looking through the publically released headers (for mod makers).

    One of the key benefits to doing this is having the whole Windows UI infrastructure at your disposal, as well as maintaining the user's preferences for keyboard repeat rate, mouse sensitivity, double click speed, and other things. Also if you obey the rules the interface will be fast and flicker free.

    The drawbacks are that you'll still have to write some code to subclass the windows controls to make them owner draw so that you can apply your own graphics and effects to them.

    Just throwing this out as an idea.

  • I am personally using CEGUI in my game project, and it is a pretty robust solution. Problem is, sometimes it almost feels like to make one tiny change your altering tons of files.

    I have not used it, but libRocket just went completely free, removing all license fees and what not. The cool part about this lib is that you write it in html/css syntax. http://librocket.com

Tags
c++ gui
Related questions and answers
  • The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game. When I attempted doing this method with my GLM(model loading library by nate robins) model, I get a segmentation fault in the debug, so I figured that it doesnt like the coordinate variables of the model. If i use blender to export my model as a collision file, what type of file should I use? I have heard of a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program.

  • I'm looking into building a cross-platform opensource 2D RPG style game engine for ChaiScript. I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license. I'm familiar with allegro, ClanLib, and SDL. As far as I can tell, none of these libraries have built in or obvious integration for SVG... not seem to have joystick input support, which would require that SDL or some other library also be used. So my question can be summed up as this: What is the best way to get SVG and joystick

  • positions Normals UVs Texturing information Animation information Collision mesh Maybe some other things... I am aware, that I could and (maybe should) create my own file format that brings these data from..., that will let me import 3d meshes into my game, ready to use? The solution/middleware should be: easy to use easy to port efficient not consuming too much memory with unnecessary things containing all the above mentioned features plus things I haven't considered yet Programming language is: C++. Currently, I'm developing under Windows 7, Visual Studio 2010, and OpenGL ES 2.0 emulator. Later

  • I have a simple question. For people that know and built ogre3D from source as a Static library, what is the order of which the libraries should be linked? The libraries I need to be organized are: Ogre Plugins 'libOgreMain.a' Ogre RenderSystems Boost(version 1.47)link Ogre's Dependencies The reason I'm asking is because in the Ogre forums, I have asked about this and didn't get a good reply... yet. The other reason is because even though I link to the boost library, I get this error: undefined reference to '_imp___ZN5boost6thread20hardware_concurrencyEv' My compiler is MinGW

  • hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: by giving points and connections between points properties such as elasticity, density, mass, shape retention, friction, stickiness, etc. What I want is a starting point: resources and helpful... or ideas. finally I was wondering if it was possible to... use the source code of an existing 3D engine such as Bullet and transform it to be 2D based? use the source code of a 2D Rigid body physics

  • implementation give me results, i.e I'm able to find a path in my map, but I'm not sure I'm using an optimal solution. For the AdjacentCost method : I just take the distance between sector's centers as the cost. I think a better solution should be to use the portal between the two sectors, compute its center, and then the cost should be : distance( sector A center, portal center ) + distance ( sector B...I'm considering using micropather to help me with pathfinding. I'm not using a discrete map : I'm working in 2d with sectors and portales. However, I'm just wondering what is the best way to compute

  • Choosing an Audio API Aidan Knight

    looking for something more drag and drop rather than something I am going to be basically writing my own front-end for. I am curious though, I remember stumbling across another library or two a few... library and stick with it. I switched physics engines 3 times which caused quite a bit of wasted time, so I would like to be set when I pick an Audio lib. I will be falling into the "indie" section as far as licensing goes. Here is what I have so far.. FMOD - Quality Middleware, success has gone to their heads and it seems they did away with the indie license recently. Price range seems to go from

  • I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes? In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language... Thanks For got to mention, the engine is based on OpenGL... Alright, for anyone who is reading this, I just found the Doom 3 md5 specifications (http://tfc.duke.free.fr/coding/md5-specs-en.html). It gives

  • ( 10.0f, 0.0f, 0.0f, 1.0f ); // z rotation Are my maths and approach correct, or am I completely wrong? Finally, I'm using the glm library with OpenGL / C++ for this. Is the order of x rotation...I'm attempting to create a 3d tree procedurally. I'm hoping that someone can check my vector rotation maths, as I'm a bit confused. I'm using an l-system (a recursive algorithm for generating... by +10 degrees in the X axis and a similar amount in the Z axis, relative to the trunk. I know that I should keep a rotation matrix at each branch, so that it can be applied to child branches, along