tags:

views:

1726

answers:

10

Imagine you are on Windows 7 and you have to write a GUI for a GRAPHIC application, (like a terrain editor, mesh viewer ..) which involves a great use of DirectX and OpenGL (so written in native C++). If your goal is a multi-platform software then you should go for wxWidgets, but imagine you're doing a Windows' only app...what would your choice be? and why?

I'm supposing that the application would work on both XP and Vista/7 and obviously in the WPF case the UI will be managed, but it will call native functions by a C++/CLI proxy-like class ( will "bouncing" from managed-native and native-managed cause performance issues? ).

+1  A: 

will "bouncing" from managed-native and native-managed cause performance issues?

definitely, but since you write just editor (not a game, in general) it's not a thing you should worry about

WPF applications rendered by DirectX subsystem as i know. so if you using only DirectX it will be a good choice.

Trickster
+6  A: 

In WPF, you can actually use DirectX Shaders to apply effects on interface objects, (here's a CodeProject article detailing development aspects) and it is expected that the support for this will continue to grow, so I would choose WPF as a development platform. Furthermore, it focuses on creating attractive user interfaces with a reasonable amout of effort, and I think this is quite important in building a Graphics oriented aplication.

luvieere
+1  A: 

I would personally use http://sourceforge.net/projects/win32-framework/ to create any Windows based applications in C++. Otherwise I would just use VB.Net or C# because you can easily port code between both and the form designer is very useful.

Nathan Adams
+1  A: 
MFC       :: Just say NO for any kind of project.
Win32     :: Well, I can not really recommend using it.
wxWidgets :: I have used it and seen no problem, good choice.
WPF       :: I have not and never will use it as it is .Net bound.
FLTK      :: Also look at http://fltk.org/, probably has better OpenGL support.
Malkocoglu
WPF/.NET is the best option for any (new) "Windows' only app".
Dan
@Dan: He mentions he will call lots of native C++ code, thanks for the downvote :-)
Malkocoglu
@Dan - this simply wrong. WPF is definitelly not the best option for *any new* Windows app.
Nemanja Trifunovic
+1  A: 

I can't really comment on wxWidgets, but WPF is vastly superior to MFC and good old Win32 API. WPF uses DirectX for rendering and there are some 3D support in WPF. Unfortunately this support is still somewhat rudimentary and not the most performant. You can actually get better 3D performance if you host a Windows Forms control that renders OpenGL (at least we had to do that in a recent project I worked on). If you want to do 3D rendering in a WPF application you could have a look at the XNA Framework. The next version of the .NET framework will also include improvements to WPF and I'm sure there will be better support for 3D.

Martin Liversage
+5  A: 

If you are comfortable with your C++ skills, I recommend WTL. It is very lightweight and results in lean machine code. The Windows version of Google Chrome was written with WTL.

Nemanja Trifunovic
not sure why this was down voted, it's a legitimate answer that wasn't suggested. +1
Idan K
+20  A: 

RAD Studio can also make the job

  • Enhanced in 2010! VCL (Visual Component Library) for rapidly building Microsoft Windows applications now includes seamless Windows 7 support, and graceful fallback compatibility with Windows Vista, XP, and 2000
  • Enhanced in 2010! Windows Vista and Windows 7 API headers to fully exploit the latest Windows capabilities
  • New in 2010! Support for Windows 7 Direct2D API

you can also make WPF with Dephi Prism and wxWidgets with twinforms

Hugues Van Landeghem
The OP mentioned C++, so it's also worth pointing out that RAD Studio includes C++ Builder.
Bruce McGee
Yes, that question seems to be calling for C++Builder and VCL.OpenGL is supported out-of-the-box, and DirectX libraries for C++Builder can be found at www.clootie.ru .
Moritz Beutel
+3  A: 

You might consider using Qt, even for a Windows-only app, simply because the Qt C++ API is so nicely done. Qt supports OpenGL and can be used in conjunction with DirectX.

Jeremy Friesner
+8  A: 

To minimize development time and maximize performance I would definite go with Delphi 2010 (Rad Studio 2010). You get native execution, direct interfaces with Windows 7 Direct2D API, and arguably one of the best IDE/Development environments available on Windows 7. What else do you want?

Larry Drews TheSoftwareRonin

Larry Drews
A: 

Be sure to check out WDL ("whittle") by the Cockos team (headed by Justin Frankel of Nullsoft/Winamp fame).

It's an extremely lightweight C++ library that includes "WDL Virtual Window system."

I personally haven't used it, but I can vouch for some great software that's been made with it. Extremely efficient and lightweight apps.

Link: WDL

Ian C. Anderson