tags:

views:

90

answers:

4
+1  Q: 

C++ and graphics

I have searched the web for information on creating GUIs(Games, Forms etc) in c++, I have found that OpenGL, Direct X and .Net framework can do this. The question I ask is which one is better to learn, what library for GUI in c++ is the most popular in industry. I know this is a newbie question, but if some on could lead me to the correct path it would be greatly appreciated.

+1  A: 

Because you mentioned DirectX I'll assume your using windows, for that I would reccomend the basic Win32 API. If you want cross platform capabilities however, I would suggest Qt.

Joe D
+3  A: 

I like QT myself.

Ed Swangren
So... apparently someone thinks QT is not valid for GUI development in C++? Or did you just glance at the topic title and assume this was a graphics library question, i.e., video games?
Ed Swangren
+3  A: 

OpenGL and DirectX are different to .Net framework. OpenGL and DirectX are for game development (Graphic acceleration) but .Net framework is for .Net development. If you use .Net framework then your program is not compiled to native code, it will be compiled to MSIL (Microsoft Intermediate Language) then .Net translate it to Native code at run-time (for the first time).

If you want a GUI toolkit for your C++ program, Qt, MFC and wxWidgets are a good choice. Qt and wxWidgets are cross-platform libraries thus your program will be compiled on all platforms (Windows/Linux/Mac OS). But MFC is only available for Windows. Qt is more feature-rich than wxWidgets and maybe is a better choice.

PC2st
MFC is never a good choice ;-)
Ferruccio
@Ferruccio: It's not as good as Qt, but someone may want it, although i don't know why! :-P
PC2st
I use MFC *sometimes* for little apps that I write to help the manufacturing guys out. If the code is inherently low level, it's just easier than using C# or something like it, but really, it's a last resort.
Ed Swangren
+1  A: 

I have searched the web for information on creating GUIs(Games, Forms etc) in c++...

What would work fine for creating traditional form-based applications won't work so well for creating games, and vice versa.

You would be better off using C# with the .NET libraries as the C++ managed extensions can be a little cumbersome. If you must go with C++, then Qt and wxWidgets are both decent options, although you're more likely to find more help and online resources for QT.

If you need to do graphics like games, then you'd better off using a higher level library than directly using DirectX or OpenGL. Ogre3d is one option on the open source side, the C4 engine is an affordable option on the commercial side. If C# is an option, then might want to look at XNA and Unity3d.

ShaderOp
+1 for Ogre3D. :-)
JustBoo