A good API?

Started by
6 comments, last by Exershio 16 years, 11 months ago
Okay, here's the deal. I'm learning C++ and OpenGL (about 1 month into it all), but I need a good API to use for window handling. I am currently using SDL to make a box for OpenGL, but I want to do more than just make a box. I may want to add seperate forms, or complex GUI stuff, etc. Would I be able to do that all with SDL? I would use the Win32 API, but I'm not sure if I want to stick with pure windows programming. What would a good window handeling API be for this? Would SDL remain suitable for complex GUI stuff? Keep in mind I still want to be able to use OpenGL for 3d rendering and such, but I also want to be able to do other GUI things. I had already checked the alternate library FAQ, but I don't know a whole lot about that stuff so I figured I'd ask for a direct response from a more experienced programmer.
Advertisement
Im not sure about the SDL, but the Win32 API should work.
You can easily use Win32 routines with OpenGL, and while still
using SDL.

So the Win32 API should suite your needs.
I was thinking of using the Win32, but are they are cross-platform alternatives that are just as good and aren't too complicated?
It depends on what you want to do and what you have. Basically there are 2 options:

If you want your graphics to behave and look as the OS graphics does you can use wxWidgets(easier than win32 and similar to mfc) or something similar. This is good for editors such as worldcraft.

If you want your graphics to look game-like and keep the same look and behavior over different OS's your best bet is probably to draw it with OpenGL(and keeping SDL).
I was thinking of using wxWidgets. It seems like it'd have everything I needed. I'll check more into it, thanks.
wxWidgets works nicely, it creates similar results on various platforms. But it's a bitch to use. It was designed back in the 1990's for the date's C++ compilers. Back then Microsoft Visual C++ 6.0 was smoking hot. And MSVC++ 6.0 has no respect for the standard whatsoever. The result: a hugely complex windowing library that is written in "C with classes".

My advice: stay ouy of wxWidgets if you can. If you must use it, then you should do so. If not, sit back and wait for the wxWidgets guys' new WIP library that is pretty much wxWidgets brought to the 00's. There was another project like this too, but I've heard it's pretty much dead and pretty little usable.

If you need a GUI toolkit for cross platform use, taking a look at GTKmm (or GTK+), it's a mile ahead. For quick and dirty cross platform GUI's you might want to take a look at FLTK 2. It's not a very good library, but it works for simple stuff. FLTK 1.x is not worth looking at.


-Riku
PS. My intention is not to say that wxWidgets is a bad library, it does work nicely but it's awful to use with C++. I've heard that it's actually a quite nice library to use with another language such as Python or Ruby.
Quote:wxWidgets works nicely, it creates similar results on various platforms. But it's a bitch to use.


Personally I find wxWidgets pretty easy to use with C++, prehaps it isn't the greatest design ever but it's nice and simple and gets the job done.
From what I've seen wxWidgets is really good and can create some amazing results. What are some other opinions on it? I don't want to get a bad impression on wxWidgets from one person's opinion.

This topic is closed to new replies.

Advertisement