This forum is in archive mode. You will not be able to post new content.

Author Topic: Some c++ graphics/gui library for newbies in GUI?  (Read 8942 times)

0 Members and 1 Guest are viewing this topic.

pllaybuoy

  • Guest
Some c++ graphics/gui library for newbies in GUI?
« on: October 24, 2012, 01:04:08 PM »
Anybody knows some good graphics library for somebody who's new to C++  oop ?
 I tried graphics.h and constrea.h but they suck and moreover no compiler supports them because these files require other header files included which are rare ,I tried them with codeblocks and devcpp but can't get em to work , I really want to get into graphics but I guess QT and directX are way too advanced for me at this state , does anybody know anyother library ? Also is GLUT okay for beginners in graphics ? If so which compiler should I use for that and how do I configure it all? or suggest any other library that you think would be suitable
thank you :)

Offline Xires

  • Noob Eater
  • Administrator
  • Knight
  • *
  • Posts: 379
  • Cookies: 149
    • View Profile
    • Feed The Trolls - Xires
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #1 on: October 25, 2012, 04:24:08 AM »
Actually, both GTK & Win32 API are relatively simple to work with.  They are also very popular.  There are a few others of note, as well; specifically wxWindows & fltk.  Qt is actually not that difficult and it's probably the easiest to use with C++ whereas the others are typically more C-oriented.  Qt can seem a little daunting at first, especially given its size, but there are many great beginning tutorials available.  Of course, Qt is also considered one of the bigger/bulkier/heavier toolkits out there so if you're concerned for resource usage, it may be better to choose something else.
-Xires

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #2 on: October 25, 2012, 07:22:40 AM »
So summing it all up , from where shall I start , QT or win32 API ?

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #3 on: October 25, 2012, 08:59:53 AM »
He did emphasize qt the most, but said all are doable. Make your own judgment.
"Always have a plan"

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #4 on: October 25, 2012, 02:11:23 PM »
I am going with win32 API then since I have friends who use win32 API , then maybe I 'll switch to GLUT ,GTK  or QT .


Offline Xires

  • Noob Eater
  • Administrator
  • Knight
  • *
  • Posts: 379
  • Cookies: 149
    • View Profile
    • Feed The Trolls - Xires
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #5 on: October 25, 2012, 05:33:07 PM »
That's a good choice and will be fairly useful down the road.  Be sure to keep in mind that Win32 API is a C-based API.  There are some things, like MFC, that offer C++ wrappers for the API but your best bet is to learn to use it directly.  One of the more useful challenges is to create your own window wrapper class, paying close attention to its use in the main event loop.
-Xires

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #6 on: October 25, 2012, 08:57:50 PM »
I kind of disagree with you Xires. I don't see the point of using the WinAPI directly if you are not going to be coding a wrapper yourself or need low level control over your windows / application. I'd go for Qt or GTK because some talented people already did the C based work for you and your implementation is most likely not going to be as good. Yes there's the whole "you should learn about it first" point but over the years I kinda call that bullshit. Hell just go on and program your app in C# with nice looking windows and if you want keep the background work in C++.

I think every developer has its role and if you are the one working on the GUI shouldn't have to work with the Win API (anymore) because of all the wrappers and libraries that are available. It's the beauty of open source software and libraries.. Tons of people worked on them and they are (most likely) good enough for you. Why do it again?

However, if your goal is to be a C programmer focusing of WinAPI GUI libraries then of course this is the way to go.. but from what I've seen in your other posts / questions you are far from choosing something that specific right now.
Satan911
Evilzone Network Administrator

Offline Xires

  • Noob Eater
  • Administrator
  • Knight
  • *
  • Posts: 379
  • Cookies: 149
    • View Profile
    • Feed The Trolls - Xires
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #7 on: October 26, 2012, 03:44:07 AM »
Satan911; You are certainly right about some very talented people having done some great work on Qt & GTK.  I didn't want to push any single toolkit over another but wanted to ensure that options were noted.  However, I don't see the choice of learning Win32 API first as a bad one.  I certainly don't think that it should stop there but there's nothing wrong with starting with it.  As for the 'you should learn about it first' point; it's true that it's a very common point but I can't consider it entirely BS, though I think I understand where you're coming from.

Win32 API is used in lots & lots of software and especially in much of the underlying system software so learning it can provide a better understanding not only to what one currently wants to do but also in understanding better how the system itself operates and with that, what to expect with any software that you create for that system.  I also have found, to my own experience, that it also helps with debugging, particularly when trying to work with things where you have no choice but to deal with the existing system.  I feel that it provides a better general working set of information from which to begin building new knowledge.

Whilst that may seem vague, consider that when working with GTK or Qt, both of which provide their own canvas support for things like OpenGL & SDL and also provide some of their own methods for working with network connectivity, at some point you may still run into a problem that exists with how that toolkit deals with the system itself.  During debugging, certain calls may be made to functions that are unfamiliar simply because they are not part of your toolkit but rather part of what your toolkit is working with.  On the more hackerly side of things; if you want to create software that will try to read information from existing dialog boxes, perhaps password fields, that software is unlikely to be written in the same toolkit that you're using.  Still, Win32 API isn't necessarily a better thing to learn first, and certainly not for everyone, but it's not a bad thing to learn at all.  As well, if someone happens to already have other friends that are familiar with it, then there may be more motivation and support for learning it than other things that are not necessarily so well known.

Application development and, in a way, even system development offers more options to the learning programmer as they can learn new stuff and try to keep up with what's 'happening'.  But for a hacker, if one should feel so inclined to follow such a path, it's pretty vitally important to know what already exists and what has become a 'standard'.  Just because Boost exists does not mean that one should skip learning the STL.

On a side note: It's really good to speak to you again, even if we do differ in opinion sometimes.
-Xires

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #8 on: October 26, 2012, 04:11:55 AM »
I agree that there's no harm in learning the WinAPI first and it certainly has advantages. Your example about Boost and the STL made me rethink my position but I honestly I still think that in some cases you don't absolutely have to learn the deepest levels of how programs work to be a good programmer. Perhaps I haven't worked enough with GUI because I always thought working directly with the WinAPI was a waste of time and barely useful in many situations (GUI related). However there's some things Boost does really well, some it doesn't and that's why learning algorithms, data structures, etc. is important and that for any language.

Honestly I don't really disagree with any of what you said it's just that knowing the OP skills and (probable) intentions I don't see why he should go for the WinAPI but I realize that's a personal opinion. There are some fields where I think you need deep understanding in order to be a good developer in any language (again see data structures, algorithms) and some where you can just "trust" the work of other developers without really needing to understand it completely.

Good talking to you to. Been working on some projects, programming competitions and still trying to land an internship in the US next summer. Worked for a US company last summer but in a Canadian office.
Satan911
Evilzone Network Administrator

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #9 on: November 04, 2012, 04:58:40 AM »
SDL might be a good choice for a mix between low level and high level.  It lets you use OpenGL but does a lot of the low level set up.  I've used SDL frequently and it is a nice mix but not for everyone.
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline Polyphony

  • VIP
  • Knight
  • *
  • Posts: 178
  • Cookies: 23
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #10 on: November 04, 2012, 05:20:42 AM »
I seem to always have problems compiling SDL programs because you have to link to libs in a certain order or something.  I don't know, it's been a while, but I would probably recommend SDL and gtk+ as they are the only ones I've ever used. 
Code: [Select]
<Spacecow_> for that matter I have trouble believing bitches are made out of ribs
<Gundilido> we are the revolutionary vanguard fighting for the peoples right to display sombrero dawning poultry
<Spacecow> did they see your doodle?
<~phage> Maybe
<+Unresolved> its just not creative enough for me
<+Unresolved> my imagination is to big to something so simple

Offline Daemon

  • VIP
  • Baron
  • *
  • Posts: 845
  • Cookies: 153
  • A wise man fears a gentle mans anger
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #11 on: November 04, 2012, 10:17:04 AM »
Holy S***!!!!!!! Satan911 && Bluechill in the same post??? Wow... mind == blown!!!! I never see you guys and now your both in one post...this must be a good topic ;)


@OP

I personally would go with Win32API because it's in so much use. Though I guess it depends on what your planning on doing with your coding skills. Do you want to code for open source projects? Do you want to reverse engineer stuff? Do you plan on finding exploits? Do you plan on writing programs and selling them online?

It really depends on what your looking to do, but Win32API is what you should go for if your looking to RE or do malware analysis or something of the sort. If your going for open source *nix projects though then the Win32API is worthless to you. Think about it and pick one, good luck man :)


PS
Sorry for weird spelling/grammar. I tried some new stuff today and I'm kinda messed up haha, typing is difficult as is coherent thoughts.... <3
This lifestyle is strictly DIY or GTFO - lucid

Because sexploits are for h0edays - noncetonic


Xires burns the souls of HF skids as a power supply

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #12 on: November 04, 2012, 01:16:03 PM »
Only post in the programming boards when topics are interesting ;)
Satan911
Evilzone Network Administrator

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #13 on: November 04, 2012, 03:03:18 PM »
Only post in the programming boards when topics are interesting ;)

This pretty much.  I rarely post unless there is a good reason for me to do so.
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #14 on: November 04, 2012, 03:06:28 PM »
I seem to always have problems compiling SDL programs because you have to link to libs in a certain order or something.  I don't know, it's been a while, but I would probably recommend SDL and gtk+ as they are the only ones I've ever used. 

You shouldn't have to link the libs in a certain order.  I've used SDL on OS X, Linux, and Windows and I've never run into that issue.  I have run into issues about linking debug libraries with non-debug libraries etc. which has led to problems but that's not an order thing.  Basically if you're getting weird errors related to SDL, make sure if you're using a debug version of your program, you use a debug version of SDL which has linked with the debug std/win32 libraries etc.  Same thing goes for release libraries, make sure you're only linking with release libraries.  Windows has incompatibilities between regular (non-debug) libraries and debug libraries as their representations are completely different and incompatible with one another.
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.