View Full Version : Graphics in C++
ChrisPatuzzo
01-07-2006, 4:55 PM
OK, so i know a bit of C++ and can do basic operations such as class creation, pointers, loops etc. The problem is however that all the programs i have created so far are text based programs including algebraic functions. Now i know a bit of C++ i would like to learn how to encorporate graphics into C++ as it adds far more variety and depth to my programming.
Does anyone know if/how this can be done and where to learn it from, as most online guides are frankly far too basic and never mention about graphics.
Please help. Chris Patuzzo.
P.S. For more detailed messages contact me at Chrispatuzzo@fsmail.net
Are you talking about graphics in terms of Windows-like GUIs or more in terms of game type graphics?
Mindslaver
01-10-2006, 6:11 PM
On what operating system do you do your programming?
Are you referring to Graphical User Interfaces, or game graphics?
How much money are you willing to spend on books?
Haplo
02-03-2006, 11:27 PM
In general, I suggest www.cprogramming.com. I also suggest looking for the allegro game library, which helps tremendously with graphics, loops, and other things like that.
Forsaken_One
02-09-2006, 11:20 PM
Not that I want to get too ahead of myself... But it is possible to use C++ to make some sort of a GUI, right?
eg.) Make a simple program to do math for me. But, has predetermined variables. Where, I select certian things through buttons, or pop-down menu's.
That is possible, right?
Yes it's possible. Premade controls are usually packaged in a library and used. There are a variety of libraries, some are cross platform, some aren't. Most graphical development on Windows is done in MFC or WinForms to a lesser extent (although MS is no longer updating MFC, so WinForms will become more popular eventually). wxWidgets is a popular cross platform library that uses the native look and feel on a number of platforms including Windows, Linux, and OS X. Some other popular libraries are GTK+ and Qt.
To clear up some confusion, OpenGL, Direct3D/DirectX, and other high performance graphics libraries are almost never used on regular applications so don't think you need to learn those to make graphic apps. I haven't had to use MFC but I here it has a nice API.
Mindslaver
02-11-2006, 1:50 PM
It is definitely possible to write GUIs with C++. There are several libraries to assist you in this realm:
wxWidgets (http://www.wxwidgets.org/)
Pure Win32 API programming (http://www.relisoft.com/win32/index.htm)
Qt (http://www.trolltech.com/download/opensource.html) (open source license only)I would avoid MFC completely. wxWidgets and Qt are your best options, but with Qt you must publish your product under an open source license, or you have to pay a licensing fee.
Modred
02-11-2006, 2:29 PM
Mindslaver, you forgot GTK (http://www.gtk.org). It's used quite a bit with GNU software, notably in packages such as the GNOME desktop environment and the GIMP. And it's completely open source and free, under the GPL.
Mindslaver
02-12-2006, 9:43 PM
Mindslaver, you forgot GTK (http://www.gtk.org). It's used quite a bit with GNU software, notably in packages such as the GNOME desktop environment and the GIMP. And it's completely open source and free, under the GPL.
Entirely my mistake - I did forget GTK. However, it does not work so well on Windows, lacking support for native windowing. That does not render it a bad choice on Windows platforms, but you'll have to live with the GTK themes. The GTK themes are still aesthetically pleasing.
The WIMP theme makes GTK apps more or less blend in with the Windows native look and feel. I use it on Gaim and GIMP.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.