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

0 Members and 1 Guest are viewing this topic.

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #15 on: November 04, 2012, 03:08:26 pm »
I just want to enter into GUI , though my aims are really high like making music players or 3d games so well you know ..some people have even suggested me GLUT and others QT , I can't go with QT , damn that 4gb download :/

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 #16 on: November 04, 2012, 03:34:27 pm »
I just want to enter into GUI , though my aims are really high like making music players or 3d games so well you know ..some people have even suggested me GLUT and others QT , I can't go with QT , damn that 4gb download :/

Don't use GLUT nor QT.  They're, in my opinion, quite bloated and include too many things you don't need.  I also don't like boost either so yeah :P but start out with something like SDL which is a good compromise and then move down to win32 or pure C/OpenGL or something or even DirectX.
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.

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #17 on: November 04, 2012, 03:37:52 pm »
Don't use GLUT nor QT.  They're, in my opinion, quite bloated and include too many things you don't need.  I also don't like boost either so yeah :P but start out with something like SDL which is a good compromise and then move down to win32 or pure C/OpenGL or something or even DirectX.
wikipedia says its for C , does it have support for c++ ? I mean the OOP part c++ at its originality , I dont want to go with C in any case thats hell too messed , and for real ? its used in macs,playstations,games and androids ? o.O Now this is something

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 #18 on: November 04, 2012, 03:44:13 pm »
wikipedia says its for C , does it have support for c++ ? I mean the OOP part c++ at its originality , I dont want to go with C in any case thats hell too messed , and for real ? its used in macs,playstations,games and androids ? o.O Now this is something

SDL, OpenGl, DirectX, Win32, they're all for C but that doesn't mean you can't use them in C++.  GLUT is also for C.  Yes, they're not object oriented (except win32 which does nasty oop in C) but they're still very good.  And you should know how to use C libraries in C++ if you really want to become a good coder.
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.

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #19 on: November 04, 2012, 03:50:02 pm »
SDL, OpenGl, DirectX, Win32, they're all for C but that doesn't mean you can't use them in C++.  GLUT is also for C.  Yes, they're not object oriented (except win32 which does nasty oop in C) but they're still very good.  And you should know how to use C libraries in C++ if you really want to become a good coder.
Honestly speaking I don't even know what a 'library' is , I am studying from primer plus 6th edition and em on the OOP chapters now , I have known header files , multi file compilations , namespaces and classes but have never encountered anything called a LIBRARY , I don't even know to include a library neither I know where to GET  any libraries :/ Yes this is stupid but can you please guide me on where to get the libraries you suggest me to learn and how to include those libraries ? :|

Offline Polyphony

  • VIP
  • Knight
  • *
  • Posts: 178
  • Cookies: 23
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #20 on: November 04, 2012, 05:44:57 pm »
Quote
Yes this is stupid but can you please guide me on where to get the libraries you suggest me to learn and how to include those libraries ? :|


This is the SDL website.

(This is only my bare understanding of it)...
When linking to a library, you #include it in your code, it can be anything from math.h to SDL/graphics.h or something similar to that, but the tricky part is when you come to the actual compilation of the program.  For math.h it is just -lm because you are going to use the -l flag for Library and what library you're going to link to... that one's called *M*ath, so we'll use -lm.

I would suggest crafting a compile command once, and then putting it in a Makefile.  it's a whole easier to type "make" rather than gcc etc...etc... over and over again.

Here is another way you could link to the SDL libraries by using a Makefile, but it uses another (easier) approach by using cflags and such... I haven't had the need for that yet except when messing with geany.  Good luck on your adventures with SDL ;)
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 #21 on: November 04, 2012, 06:57:38 pm »
Honestly speaking I don't even know what a 'library' is , I am studying from primer plus 6th edition and em on the OOP chapters now , I have known header files , multi file compilations , namespaces and classes but have never encountered anything called a LIBRARY , I don't even know to include a library neither I know where to GET  any libraries :/ Yes this is stupid but can you please guide me on where to get the libraries you suggest me to learn and how to include those libraries ? :|

Based on that post right there I would say avoid GUI for now man. You really need to finish the book, then read another book or two, as for libraries....it's in your book if it's a good book. and if it's not, google has the answer for you my friend.

I would recommend reading "Absolute C++" as well (really good for learning OOP in C++) and check out "writing great code" as well. Pretty interesting read.

Also, don't just read the book and do the examples they have in there. You really need to feel so comfortable with C that if I ask you to wright a CLI application for me you can do it. In fact heres a few projects I had to do for my C++ class:

*Computer picks a number between 1-10. Player then guesses, if the guess is too high or too low then the computer says so and
prompts the player to guess again. If the guess is correct, then the game displays a winning message and ends.
//This makes use of the random number generator which comes from a specific library in C++

*

Store simulator, 5 products with descriptions. You can then buy the products and have the customer "pay" you for them.
Don't let them leave until they have completely paid for the product. If they pay to much give them change, if they pay too
little then make them pay the balance. After payment is complete, provide them with a receipt.


*
 A basic MUD game. Give your player minimum 5 rooms to explore, give them something like money or items or luck or health that
the game has to keep track of.

These should get you started man, remember just reading isn't enough. It takes practice to program well and feel comfortable
in a language.

« Last Edit: November 04, 2012, 06:58:24 pm by Daemon »
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

pllaybuoy

  • Guest
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #22 on: November 05, 2012, 04:28:40 am »
Based on that post right there I would say avoid GUI for now man. You really need to finish the book, then read another book or two, as for libraries....it's in your book if it's a good book. and if it's not, google has the answer for you my friend.

I would recommend reading "Absolute C++" as well (really good for learning OOP in C++) and check out "writing great code" as well. Pretty interesting read.

Also, don't just read the book and do the examples they have in there. You really need to feel so comfortable with C that if I ask you to wright a CLI application for me you can do it. In fact heres a few projects I had to do for my C++ class:

*Computer picks a number between 1-10. Player then guesses, if the guess is too high or too low then the computer says so and
prompts the player to guess again. If the guess is correct, then the game displays a winning message and ends.
//This makes use of the random number generator which comes from a specific library in C++

*

Store simulator, 5 products with descriptions. You can then buy the products and have the customer "pay" you for them.
Don't let them leave until they have completely paid for the product. If they pay to much give them change, if they pay too
little then make them pay the balance. After payment is complete, provide them with a receipt.


*
 A basic MUD game. Give your player minimum 5 rooms to explore, give them something like money or items or luck or health that
the game has to keep track of.

These should get you started man, remember just reading isn't enough. It takes practice to program well and feel comfortable
in a language.



I guess you're right ,maybe I should practice OOP and practical programming more  before getting into GUI , the building won't be any better if the foundations are weak , thanks :)

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 #23 on: November 05, 2012, 07:13:09 am »
I guess you're right ,maybe I should practice OOP and practical programming more  before getting into GUI , the building won't be any better if the foundations are weak , thanks :)

No problem man. Glad I could help :)
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 jmscobra

  • Serf
  • *
  • Posts: 26
  • Cookies: 0
  • Fappin' over the web /2.0/
    • View Profile
Re: Some c++ graphics/gui library for newbies in GUI?
« Reply #24 on: November 28, 2012, 10:48:26 am »
Try looking into FLTK, there's a whole tutorial on that.

I use that, along with xming and putty to run my GUI C++ programs. Works great too.

Let me know if you want me to supply you my header and cpp files as reference to get you started.
Yehhh yehhh yehhh