ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to make a GUI for a chess program, but in a way that will be quick but nice. Unfortunately I'm not acquainted with OpenGL [I know C/C++ programming fairly well] so unless someone knows a quick guide to learning OpenGL, I guess I would have to resort to another option. I know how to do TCL GUIs, but I was wondering whether anyone could give suggestions on other GUI languages on the Linux platform that I can program in? Any help would be appreciated.
Anyway, there is a bunch of linux gui libraries (though i am not very familiar with any).
You could always go low (but simple) with ncurses.h for c/c++, but it's command line graphics and not windows stuff (correct me if i am wrong on this). Other than that, you could try out the GUI facilities found in other languages, like Perl (Tk), Python, Java, etc...
SDL is certainly not only for Windows. It's an abstraction layer working on top of many operating systems, including Linux and Windows. Because it abstracts from different underlying OS-specific code, it tends to be much easier to pick up and understand.
It is, however, not a GUI lib, it's a media lib. You might want to search for a GUI lib built on top of SDL (sorry, I've not used SDL and don't know any).
You could look at gtkmm (www.gtkmm.org) it is a c++ wrapper of gtk. Lots of documentation, so it shouldn't be too bad.
BTW, for the creation of a chess board, openGL would be really quite easy. A good book is 'OpenGL game programming'. Written for windows, but if you ignore the first two chapters it is OS Independant. Quick introduction to making stuff work, and then once you know the basics, it should be easy from there.
If you choose the OpenGL route, check out NeHe's website for tutorials and forums.
Thanks a lot for the feedback. I will check on some of the things you mentioned. I checked Nehe's website, but, unless I downloaded the wrong stuff, the code examples are java. But I have found other links. I have decided to go for OpenGL. I'd like to know one more thing. I've seen something about a library called GLUT, apparently mostly used in Linux OpenGL apps/ something like that. Anybody who has more information on this? And roughly how long would it take for an average-experience C/C++ programmer acquainted with Linux take to learn what I'd need to learn for this ?
Most of Nehe's native tutes are not java but windows c++ with glut. You must've hooked one of the many ports of Nehe's demo code - quite groovy, you can look at the same code for linux c++ with SDL for some tutes, lots of source ports there on Nehe.
Track down the red book/blue book, they're downloadable and really useful.
I use SDL instead of glut - easy, nice helper functions too for non-graphical stuff ... I like it.
hi,
look at www.fltk.org
I think the fltk is a good and interface for C++/C. fltk is open source software multiplatform an da lot of examples ( checker for example)come with.
I have also some simple examples that I have written my self for beginners I can send them if you want
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.