View Full Version : C++ graphics
Isengard
07-02-2002, 04:05 AM
Are there any good sites or books on graphic handling in C++ ?
sans-hubris
07-02-2002, 04:28 AM
Just pick up a book on OpenGL. That should do.
CheeseLick
07-02-2002, 12:29 PM
It depends on what kind of graphics you want to do. If you're into games, check out GameDev (http://www.gamedev.net), Flipcode (http://www.flipcode.com/), and Gamasutra (http://www.gamasutra.com).
In any case, your best bet is google (http://www.google.com/).
Strike
07-04-2002, 03:49 AM
Yeah, "graphics" is a rather generic, broad area of programming. You can make the first split at 2D versus 3D. 3D has a bunch of subclasses as well - animation, raytracing, game engines, non-raytracing rendering, etc. 2D usually consist of building apps with windowing toolkits or building games using sprites and such. At any rate, a more specific description of what you are looking for would be a good start.
Tarkus
07-18-2002, 02:04 AM
I wrote a handy dandy little set of sprite handling routines for the windows API, it's not much but it seems to work pretty well... it also does sound, but only one at a time.
You define your sprites and wether or not they have a transparency mask or not then you can either use an index number which was returned or call it by the defined name.
I'd put a link to it, but it's written by me and hence it's shit... :(
virtual
08-20-2002, 02:04 AM
i have done graphics in Turbo C, like Access, Windows, paint brush and many more , if u r interested i 'll send them ....
stuka
08-20-2002, 11:07 AM
Tarkus: put up the linkage! If nothing else, someone might be able to suggest improvements, or learn from what you've done. I think that's why most of us hang out here.
Stuka: I hang out here because of all the chicks. :)
darelf
08-20-2002, 03:17 PM
KMJ: Ditto
Kamikaze!
08-24-2002, 12:09 PM
I recently wrote a tiny C++ library (not yet finished, but it works) that handles mouse/keyboard and VGA graphics in DOS (320x200 and 320x240 with 256 colors). It has sprite support and can use pcx files.
Sprites can be scaled and rotated and can use a masked color (by color index).
You can also load pallets extracted from pcx files. First you make a pallete in a pcx file with, for example, Paintshop Pro, then you extract, load and apply it with 3 simple functions (appropriately named pcx_pal_extractor(), load_pallete() and apply_palette() ).
I made it because DirectX is very difficult and I figured it's better to first learn how 2D graphics work before I learn 3D. VGA is surprisingly easy :D Only compiles with DJGPP though.
I used these sites:
http://www-scf.usc.edu/~akotaobi/gptut.html (use it for the graphics part)
http://www-scf.usc.edu/~akotaobi/opkey.html (keyboard)
http://www.brackeen.com/home/vga/index.html (mouse, you have to change the code a bit to make it work in DJGPP but it shouldn't be a problem if you've done the other tutorials)
http://inversereality.org/tutorials/tutorial.html (unchained mode, image rotation/scaling)
http://brand107.home.attbi.com/pc-gpe/ (Asphyxia tutorials about the Bresenham line and circle algorithms).
http://www2.netdoor.com/~gregory/loadpcx.html (loading pcx files, doesn't tell you everything you need to know though)
And post your code Tarkus!
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.