Now I know there is a way to get into some "mode" to view graphics in a c++ program. Unfortunatly, all tutorials I have read left me clueless as to how this is done. Can anyone please clear this up for me.
Now I know there is a way to get into some "mode" to view graphics in a c++ program. Unfortunatly, all tutorials I have read left me clueless as to how this is done. Can anyone please clear this up for me.
What do you mean by graphics mode? like displaying images? just changing colors?
Or are you talking about the whole window being graphical, like win32 API or MFC
i mean like displaying images when u run the program. i wanna learn how to make games, but for now i wanna learn how just to display them
check jvorkoey's thread
http://cboard.cprogramming.com/showthread.php?t=67880
he made a library that can dislpay images in MS_DOS examine it.
But if you are comfortable with C++ move to Win32. Its much easier to do graphical things with win32, and that takes you 1 step closer to game programmer
There is no "graphics mode" in ANSI/ISO Standard C++.
So, it all depends on your system, compiler, and the type of graphics you want to display. If you're on a Windows system, and you already have the approximately 2 pages of "overhead" code to create a window, it's not too hard to display a bitmap image or to generate a simple shape.
For more advanced graphics, you'll need a graphics library such as DirectX, and you'll probably need a book covering the graphics library of your choice.
I'm not 100% sure, but I think you really need to learn Windows (or other GUI) programming before trying to learn a specialized graphics library.
well i was gunna try that ogre one that i found from a link somewhere here. i'm using i think windows 98 and dev c++ 4
i tried doin the lines and stuff but all i got was errors so i abandoned it.
http://hge.relishgames.com/ is very easy to use and friendly for full screen "game" style graphics. For GUI do WIN32.
As far as using Haaf's, you might have to look up simple double buffering, as that can be hard to get a grasp on. In a nutshell, all you do is run a rapid loop(the main game loop), and you 1) Clear the backbuffer, 2) Stamp sprites to it in whatever order pleases you(including rotation and alpha I beleive, which is nice ), 3) flip the backbuffer forward. That should pretty much get you set if you want graphics and want em now
As for 3D... well, I know a lot of people want to rush right into it. Nothing wrong with that, I understand where the urge comes from. I think, however, that it might be best to do something simpler first. I am just a N00b myself though, so take it with a grain of salt.
EDIT: As a bonus, HGE doesn't rely on you knowing any real WIN32. You can just sort of use the main loop to set FrameFunc and go with it. Granted, it is probably sill a *really* good idea to learn some WIN32, and it certainly isn't information that will go to waste, as it is a differant kind of programming(event driven) as opposed to what most people learn first(main loop).
Last edited by tol; 07-26-2005 at 06:19 PM.