views:

79

answers:

2

Dear all,

I have a simulation software (C++) that runs on the command line. It is platform independent (currently compiling and running on Windows, MacOS X and Linux). When the simulation ends, I visualize the result with SDL; it is a very basic 2d view, mainly color squares next to each other.

I would like to have a user interface on top of the simulation so that I can start and pause the simulation, and change the parameters on the fly. Something pretty simple I guess. Well, ideally I will also add a grapher somewhere to see the evolution over time of some parameters.

Now, I am wondering what direction I should go. Should I try to use one of the UI libraries for SDL ? Or maybe wxwidget in conjunction with SDL ? Or simply wxwidget and get rid of SDL ?

Do you have any experience with this ?

Thanks in advance Barth

PS: I tried to use AGAR, a SDL UI library. It seemed very promising but I couldn't get it working. Not even the helloworld.

+1  A: 

Probably using wxWidgets without SDL would be the easiest way to go. SDL is a media layer -- it's supposed to allow cross-platform media application development. As you only need graphical display, you only need wxWidgets -- and it will be a lot easier too!

You would benefit from SDL if:

  1. you'd need very fast blitting of very large amount of surfaces (we're talking the 60fps range here)
  2. you'd use RLE, color keying or other graphics operations
  3. you'd use other media (sound, advanced real-time input, etc)
  4. you'd need to run the software on embedded systems (handheld consoles, etc)

If the answer to all 4 is "no", then you won't benefit from SDL, and using wx alone will be much easier.

Kornel Kisielewicz
Thank you for your answer. I will go for wxwidget then. I will start reading about it. I was unsure I could display 2d surfaces and stuff like that. Thanks again
Barth
+2  A: 

It may be worth you time to look into Qt. It is generally the most mature free Gui framework available. It is cross platform. And it has hardware accelerated rendering if your drawing needs some speed.

Here is a comparison posted on WxWidgets site.

In the end if your windowing needs are minimal you should choose the framework you are most comfortable with.

caspin
and it has an opengl canvas for you to draw on - which is what you'd probably be using with SDL.
gbjbaanb