Newbie trying to learn graphics programming

Started by
12 comments, last by New_Blood 23 years, 9 months ago
Hi everyone. Well, I'm just a newbie to graphics programming... in fact, I think you could say I know nothing about graphics programming except how to draw objects in Turbo C for DOS. Anyway, I have MS VC++ 6.0 now, and I would really like to learn about graphics programming. This site seems to be cool, if a bit overwhelming! I have quite a few questions - 1. Everywhere I go, I see DirectX this, DirectX that. It really seems complicated, and that SDK is huge. I know you can download a smaller version, but then someone said the samples and docs are neat. I just want to know whether it is possible to program graphics for windows without DirectX, or whether that option is just useless i.e. no cool features, poor/mediocre quality, thereby making it logical to use DX. 2. I would like to know how one displays a bitmap, PCX or any other popular file format on the screen, and, if possible, how to manipulate it 3. Can anyone recommend tutorials on the basics of graphics programming in Windows? 4. If it's any help, I'm looking to design a tetris-style game, based on the suggestion from Geoff Howland's (I think!) article, so what should I learn before I even try to make a game like this? 5. What is an MFC app? (Sorry about my incessant questioning and the topic shifting, I'm just a young and foolish newbie, so please forgive me!) I know about the basics of C++, pointers, functions etc., and some OOP as well, but nothing about Windows programming and DirectX. Any help and/or code based on the above questions would be most appreciated, believe me! Edited by - New_Blood on 7/8/00 5:29:07 PM
Advertisement
Hi

1.) Yes. You an use the more beginner friendly OpenGL interface.
Go to NeHe Productions, a great site with good tutorials. YOu can also use plain win32 GDI, that''s the graphics interface for normal windows applications. You find a VB6 example of such a game on my site.

2.) On www.wotsit.org is lots of informations about file formats. Windows has a LoadImage functions and you find many image loading librarys on the web. You can treat an image as an array of colours and write your own stuff, for drawing u might want to use the win32 GDI.

3.) I nevern seen any good ones for C++. I just recommend you to pic up a copy of Charles''s Petzolds book "Programming Windows". Very good one, valuable for any "Windows" coder.

4.) Learn how to code real windows applications, pick up the book from 4. Tetris is easy, so you don''t need much knowledge about software design, math or gfx programming.

5.) MFC is a set of C++ classes that comes with your VC++ compiler. It encapsulates the functionality of the win32 API in classes, it is a framework for application development. It''s more or less useless when doing an game, but I think it''s probably impossible to develop a huge app like MS Word without such a framework.

Good luck

Tim

--------------------------
www.gamedev.net/hosted/glvelocity
glvelocity.gamedev.net
www.glvelocity.com
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Thanks for all the help! I saw NeHe productions, and the OpenGL tutorials seem to be really something!! However, I don''t think I quite framed my first question right. What I meant was is it possible to use graphics in Windows without any API like DirectX, OpenGL etc.? Also, is any SDK or the like needed for OpenGL? Thanks once again!
ya, you could use GDI. I wouldn''t recomend it unless you had a Pentium 800 Mghz. (like me) :p

JoeMont001@aol.com | www.polarisoft.n3.net
hmm, that was me above. weird.

JoeMont001@aol.com | www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
G''day, mate!

It is possible to do graphics with plain windows functions, without needing any API like DX or OGL. But using those functions when programming a game is not a very good idea because they are very slow, and rarely, if at all, use proper graphics acceleration of the card itself. Also, win graphics can''t do 3D. You could try and wirte your own 3D stuff and base it on the windows graphics, but that would be way too slow and would take way too much effort, eh? If you want to use 3D you''ll need some sort of API. OpenGl does have an SDK (as far as I''m aware) and is quite a bit smaller than the DirectX SDK, but you also have to remember that DirectX is not just graphics, it''s graphics, 3D, input, sound, and multiplayer routines all in the one basic, ie. main, system.Tetris doesn''t sound like the sort of thing for 3D though, I guess.
Check to see if you got a copy of the MSDN library with VC++. If you did you should find a copy of the DX SDK, and I think (but am not sure) there is an OGL SDK in there too somewhere. I got mine in 98/99 (not sure), so I got the DX5 SDK on that, ordered the DX6 SDK on CD from the US, and downloaded the DX7 SDK later. Please remember why the DX SDK is sooo big though, it''s more than just graphics, plus it''s got an absolute s--tload of really cool samples, hepls, and stuff.

You can disregard most of my rantings if you wish.
Hope that helped.


__________________________
"I like the green one better."
G''day to you too, mate!

Thanks for answering my nagging doubts about whether an API is needed or not! To answer your question, yes, I do have the MSDN collection, but the documentation on DirectX is DX5, so the SDK is probably also for DX5. I guess I may as well start downloading that darn DX7 SDK(cool samples or not, it still is over a 100MB!).

Also, thanks for clearing up my prior conception of DX being just a graphics API. Is that to say OpenGL is only capable of handling graphics? In that case, is it possible to use both OpenGL(for graphics) and DirectX(for input, sound etc.)? I ask this because I find OpenGL to be a little easier than DirectX.

(I know my topic shifting is irksome, but please try to put up with it!)

One last thing - what would be most suitable for a game like Tetris - DirectX or OpenGL(or both)? Any help, as always, is appreciated.

To Julio:

You don''t need an 800 Mhz computer to use the Windows GUI. I have a K6 233 and I use the Windows GUI all the time for games. However, I do mostly puzzle and board games.



#define MY_LIFE BUSY
http://www.crosswinds.net/~druidgames/resist.jpg
well cobber? its posible to use opengl with directinput+sound ive used them together 4 a couple of years.
"Everywhere I go, I see DirectX this, DirectX that. It really seems complicated" doing it under the gdi will be a lot harder.
i wrote tetris last week using glut have at look at
http://members.xoom.com/myBollux/home.html
it comes with code as well.

if you''re looking for a graphics interface for just playing around with i would highly recommend OpenPTC (www.gaffer.org/ptc/). I use it all the time when i have a graphics idea i quickly want to code and see without having to deal with coding directdraw initialization routines and all that mess.
http://www.inmytree.com/~roz/

This topic is closed to new replies.

Advertisement