Sign in to follow this  
Followers 0
Dr. Z2A

opengl vs gtk vs qt vs w/e else

9 posts in this topic

I have recently taken an interest in programming GUIs. I am wondering what library would you all recommend to learn with. My only previous gui programming experience has been writing games with Allegro. I have decided against learning to use directx because I don't use Windows very much anymore. I don't use KDE, so I am thinking I wouldn't want to mess around with qt. What would you all recommend to use? (be it gtk, opengl, or something that I'm not thinking of)

0

Share this post


Link to post
Share on other sites
I have recently taken an interest in programming GUIs.  I am wondering what library would you all recommend to learn with.  My only previous gui programming experience has been writing games with Allegro.  I have decided against learning to use directx because I don't use Windows very much anymore.  I don't use KDE, so I am thinking I wouldn't want to mess around with qt.  What would you all recommend to use? (be it gtk, opengl, or something that I'm not thinking of)

OpenGL is something I used to use for video game programming.

I found it pretty easy, but its not something I'd code a GUI in. I mostly used it for 3D stuff.

I do think its got 2D architecture though, and image mapping is pretty simple, so if you want to use a base of images to map its probably going to be one of the good ones.

I don't really know much about other stuff, its really the only thing I focused in when it came to graphics programming. Hope it helps.

0

Share this post


Link to post
Share on other sites

GTK is rather universal (win/lin of any kind) if you are looking for just application front end to some powerful engine, but i wouldn't ever think of doing any games or anything in it

i just use it to make front-ends/wrappers for cli scripts/programs that people who don't like cli or programs that would really benefit from the gui

0

Share this post


Link to post
Share on other sites

OpenGL is cross-compatable as well.

0

Share this post


Link to post
Share on other sites

This article on freshmeat gives an overview of some of the GUI toolkits available to use under X (and some which can be used under Windows too). It's a few years old now but some of what it says stands true today.

I'd personally reccomend GTK primarily because I've found it nice to work with under both X and w32 (w32 support now is much better now than it was when that article was written) - most people running X will have appropriate GTK libraries installed. There's always Glade if you want to develop interfaces visually.

As far as OpenGL and DirectX go, these are graphics libraries (and in DirectX's case, a complete multimedia library) which aren't used in simple GUIs. If you're making a screensaver or a game (for tiled games, use SDL) or something that would have graphics requirements beyond the those of simple widgets then you may want to consider using OpenGL.

Edited by heprimm
0

Share this post


Link to post
Share on other sites

GTK+ is for C, there is GTKmm for C++

QT is C++ only

both QT and GTK+, as well as wxWidgets have python/perl/lisp/some other language here bindings as well

0

Share this post


Link to post
Share on other sites

Apart from qt using kde, qt has nothing whatsoever to do with kde. You can eliminate opengl for gui applications, for the most part, it is not well suited for that. It is a graphics engine. The choices you should consider are basically three:

qt (gpl)

gtk+ (lgpl)

wxWidgets (lgpl)

Objectively speaking, the best among these is qt, it is just a really well designed class library. My second choice (or my first choice if developing a proprietary application) would be wxWidgets. It's pretty good, but not as good as gtk+ imo. Both will produce guis that look right on the native platform.

Gtk+ would be my last choice, and the only reason i'd use it is if you are afraid of c++.

I have recently taken an interest in programming GUIs.  I am wondering what library would you all recommend to learn with.  My only previous gui programming experience has been writing games with Allegro.  I have decided against learning to use directx because I don't use Windows very much anymore.  I don't use KDE, so I am thinking I wouldn't want to mess around with qt.  What would you all recommend to use? (be it gtk, opengl, or something that I'm not thinking of)

0

Share this post


Link to post
Share on other sites

SDL is also verry nice - very easy to pick up, and has hooks built-in for openGL.

0

Share this post


Link to post
Share on other sites

SDL sucks for making gui applications, which is what the op asked about. It's a good library for tasks it is well suited for, though (games).

SDL is also verry nice - very easy to pick up, and has hooks built-in for openGL.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0